fixed 2 bugs with gc
This commit is contained in:
parent
74396834cf
commit
3582722faa
@ -618,7 +618,7 @@ class MainWindow(QtWidgets.QMainWindow, Singleton):
|
|||||||
for i in range(len(chats)):
|
for i in range(len(chats)):
|
||||||
name, number = chats[i]
|
name, number = chats[i]
|
||||||
item = invite_menu.addAction(name)
|
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()
|
plugins_loader = plugin_support.PluginLoader.get_instance()
|
||||||
if plugins_loader is not None:
|
if plugins_loader is not None:
|
||||||
|
@ -1316,6 +1316,8 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
return list(groups)[0]
|
return list(groups)[0]
|
||||||
|
|
||||||
def add_gc(self, number):
|
def add_gc(self, number):
|
||||||
|
if number == -1:
|
||||||
|
return
|
||||||
widget = self.create_friend_item()
|
widget = self.create_friend_item()
|
||||||
gc = GroupChat('Group chat #' + str(number), '', widget, self._tox, number)
|
gc = GroupChat('Group chat #' + str(number), '', widget, self._tox, number)
|
||||||
self._contacts.append(gc)
|
self._contacts.append(gc)
|
||||||
|
Loading…
Reference in New Issue
Block a user