Stopping client online time updater when client isn't in view anymore
This commit is contained in:
parent
27e3967ffa
commit
6b275a16ff
1 changed files with 7 additions and 1 deletions
|
@ -2458,7 +2458,13 @@ test
|
|||
this._online_time_updater = undefined;
|
||||
return;
|
||||
}
|
||||
online_time.text(format.time.format_online_time(client.calculateOnlineTime()));
|
||||
|
||||
if(client.currentChannel()) /* If he has no channel then he might be disconnected */
|
||||
online_time.text(format.time.format_online_time(client.calculateOnlineTime()));
|
||||
else {
|
||||
online_time.text(online_time.text() + tr(" (left view)"));
|
||||
clearInterval(this._online_time_updater);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue