Only trigger mismatch check if someone joins your room or changes file within your room

This commit is contained in:
Et0h 2014-11-30 10:00:00 +00:00
parent 3b6b7c4bbe
commit b103363e41

View File

@ -653,7 +653,7 @@ class SyncplayUserlist(object):
self._users[username] = user self._users[username] = user
if not noMessage: if not noMessage:
self.__showUserChangeMessage(username, room, file_) self.__showUserChangeMessage(username, room, file_)
self.userListChange() self.userListChange(room)
def removeUser(self, username): def removeUser(self, username):
hideFromOSD = not constants.SHOW_DIFFERENT_ROOM_OSD hideFromOSD = not constants.SHOW_DIFFERENT_ROOM_OSD
@ -690,7 +690,7 @@ class SyncplayUserlist(object):
self.__showUserChangeMessage(username, room, file_) self.__showUserChangeMessage(username, room, file_)
else: else:
self.addUser(username, room, file_) self.addUser(username, room, file_)
self.userListChange() self.userListChange(room)
def setUserAsController(self, username): def setUserAsController(self, username):
if self.currentUser.username == username: if self.currentUser.username == username:
@ -718,8 +718,9 @@ class SyncplayUserlist(object):
return True return True
return False return False
def userListChange(self): def userListChange(self, room = None):
self._roomUsersChanged = True if room is not None and self.isRoomSame(room):
self._roomUsersChanged = True
self.ui.userListChange() self.ui.userListChange()
def roomStateConfirmed(self): def roomStateConfirmed(self):