fixed 2 bugs with gc

This commit is contained in:
ingvar1995 2018-09-13 23:23:25 +03:00
parent 74396834cf
commit 3582722faa
2 changed files with 3 additions and 1 deletions

View File

@ -618,7 +618,7 @@ class MainWindow(QtWidgets.QMainWindow, Singleton):
for i in range(len(chats)):
name, number = chats[i]
item = invite_menu.addAction(name)
item.triggered.connect(lambda: self.invite_friend_to_gc(num, number))
item.triggered.connect(lambda number=number: self.invite_friend_to_gc(num, number))
plugins_loader = plugin_support.PluginLoader.get_instance()
if plugins_loader is not None:

View File

@ -1316,6 +1316,8 @@ class Profile(basecontact.BaseContact, Singleton):
return list(groups)[0]
def add_gc(self, number):
if number == -1:
return
widget = self.create_friend_item()
gc = GroupChat('Group chat #' + str(number), '', widget, self._tox, number)
self._contacts.append(gc)