Prevent room history from saving empty room name

This commit is contained in:
Gabriel Dolberg 2020-07-17 18:10:22 +03:00
parent a6676020c3
commit bc87d53c11

View File

@ -383,6 +383,8 @@ class ConfigDialog(QtWidgets.QDialog):
def updateRoomHistory(self, newRoom=None):
if newRoom is None:
newRoom = self.defaultroomCombobox.currentText()
if not newRoom:
return
roomHistory = self.config['roomhistory']
if newRoom in roomHistory:
roomHistory.remove(newRoom)