Skip to content

Commit

Permalink
List current rooms in join list
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h committed Nov 7, 2021
1 parent 3b2bb27 commit 4383ca5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions syncplay/ui/gui.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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]:
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 4383ca5

Please sign in to comment.