Skip to content
Snippets Groups Projects
Commit ceb8664d authored by Vincent Texier's avatar Vincent Texier
Browse files

Refresh wot after certifying someone

parent e144dc5a
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ class Account(QObject): ...@@ -33,6 +33,7 @@ class Account(QObject):
loading_progressed = pyqtSignal(Community, int, int) loading_progressed = pyqtSignal(Community, int, int)
loading_finished = pyqtSignal(Community, list) loading_finished = pyqtSignal(Community, list)
wallets_changed = pyqtSignal() wallets_changed = pyqtSignal()
certification_accepted = pyqtSignal()
def __init__(self, salt, pubkey, name, communities, wallets, contacts, identities_registry): def __init__(self, salt, pubkey, name, communities, wallets, contacts, identities_registry):
""" """
...@@ -496,6 +497,8 @@ class Account(QObject): ...@@ -496,6 +497,8 @@ class Account(QObject):
for r in responses: for r in responses:
if r.status == 200: if r.status == 200:
result = (True, (yield from r.json())) result = (True, (yield from r.json()))
# signal certification to all listeners
self.certification_accepted.emit()
elif not result[0]: elif not result[0]:
result = (False, (yield from r.text())) result = (False, (yield from r.text()))
else: else:
......
...@@ -71,6 +71,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget): ...@@ -71,6 +71,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
def change_account(self, account, password_asker): def change_account(self, account, password_asker):
self.account = account self.account = account
self.password_asker = password_asker self.password_asker = password_asker
self.account.certification_accepted.connect(self.refresh)
def change_community(self, community): def change_community(self, community):
self._auto_refresh(community) self._auto_refresh(community)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment