switch users from unknown->disconnected if user goes online
This commit is contained in:
parent
5c6d39952b
commit
d417347d3c
1 changed files with 6 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.statusIcon = function(user, index) {
|
||||
|
||||
var status = getStatus(user),
|
||||
that = Ox.Element({
|
||||
var status = 'unknown';
|
||||
status = getStatus(user);
|
||||
var that = Ox.Element({
|
||||
tooltip: Ox._({
|
||||
connected: 'Connected',
|
||||
disconnected: 'Disconnected',
|
||||
|
@ -42,6 +42,9 @@ oml.ui.statusIcon = function(user, index) {
|
|||
}
|
||||
|
||||
function getStatus(data) {
|
||||
if (user.id != oml.user.id && data.id == oml.user.id && data.online) {
|
||||
return status == 'unknown' ? 'disconnected' : status;
|
||||
}
|
||||
if (!oml.user.online) {
|
||||
return 'unknown';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue