From 4383ca5d7ba4f2f3ef0da2ef760785106a0281e4 Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 7 Nov 2021 16:21:41 +0000 Subject: [PATCH] List current rooms in join list --- syncplay/ui/gui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 1b5bf9f70..a6b4e12f5 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -468,6 +468,9 @@ def fillRoomsCombobox(self): self.roomsCombobox.clear() for roomListValue in self.config['roomList']: self.roomsCombobox.addItem(roomListValue) + for room in self.currentRooms: + if room not in self.config['roomList']: + self.roomsCombobox.addItem(room) self.roomsCombobox.setEditText(previousRoomSelection) def addRoomToList(self, newRoom=None): @@ -603,7 +606,9 @@ def showUserList(self, currentUser, rooms): ): self._syncplayClient.fileSwitch.setCurrentDirectory(os.path.dirname(self._syncplayClient.userlist.currentUser.file["path"])) + self.currentRooms = [] for room in rooms: + self.currentRooms.append(room) if self.hideEmptyRooms: foundEmptyRooms = False for user in rooms[room]: @@ -704,6 +709,7 @@ def showUserList(self, currentUser, rooms): self.listTreeView.expandAll() self.updateListGeometry() self._syncplayClient.fileSwitch.setFilenameWatchlist(self.newWatchlist) + self.fillRoomsCombobox() @needsClient def undoPlaylistChange(self): @@ -2085,6 +2091,7 @@ def __init__(self, passedBar=None): self._syncplayClient = None self.folderSearchEnabled = True self.hideEmptyRooms = False + self.currentRooms = [] self.QtGui = QtGui if isMacOS(): self.setWindowFlags(self.windowFlags())