// 手机在线、web在线、pc在线
public @NonNull String desc() {
if (this.customState > 0) {
//0,未设置,1 忙碌,2 离开(主动设置),3 离开(长时间不操作),4 隐身,其它可以自主扩展。
String[] cs = new String[]{"未设置", "忙碌", "离开(主动离开)", "离开(长时间未操作)", "隐身"};
//return this.customText + cs[this.customState];
return "离线";
}
- String onlineClientDesc = "";
- String lastSeenDesc = "";
- for (ClientState s : clientStates) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- String[] ps = new String[]{"", "iOS", "Android", "Windows", "mac", "Web", "小程序", "Linux", "iPad", "Android-Pad"};
- if (s.getState() == 0) {
-
- onlineClientDesc += ps[s.getPlatform()] + " ";
-
- } else {
-
- lastSeenDesc += ps[s.getPlatform()] + " ";
- }
- }
-
- if (!TextUtils.isEmpty(onlineClientDesc.trim())) {
-
- return "在线";
- } else if (!TextUtils.isEmpty(lastSeenDesc.trim())) {
-
- return "离线";
- }
-
-
- return "离线";
- }