mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
improved libappindicator load, making user online for some time after incoming msg
This commit is contained in:
@@ -193,7 +193,10 @@ namespace App {
|
||||
}
|
||||
|
||||
int32 onlineWillChangeIn(int32 online, int32 now) {
|
||||
if (online <= 0) return 86400;
|
||||
if (online <= 0) {
|
||||
if (-online > now) return -online - now;
|
||||
return 86400;
|
||||
}
|
||||
if (online > now) {
|
||||
return online - now;
|
||||
}
|
||||
@@ -217,11 +220,12 @@ namespace App {
|
||||
if (online <= 0) {
|
||||
switch (online) {
|
||||
case 0: return lang(lng_status_offline);
|
||||
case -1: return lang(lng_status_invisible);
|
||||
case -2: return lang(lng_status_recently);
|
||||
case -3: return lang(lng_status_last_week);
|
||||
case -4: return lang(lng_status_last_month);
|
||||
}
|
||||
return lang(lng_status_invisible);
|
||||
return (-online > now) ? lang(lng_status_online) : lang(lng_status_recently);
|
||||
}
|
||||
if (online > now) {
|
||||
return lang(lng_status_online);
|
||||
|
Reference in New Issue
Block a user