Skip to content
Snippets Groups Projects
Commit b95d22ba authored by inso's avatar inso
Browse files

Fix bug #310

parent 23e0f20d
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QFrame, QLabel, QVBoxLayout, QLayout ...@@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QFrame, QLabel, QVBoxLayout, QLayout
from PyQt5.QtCore import QSize, pyqtSignal from PyQt5.QtCore import QSize, pyqtSignal
from ucoinpy.documents.block import Block from ucoinpy.documents.block import Block
from ..tools.decorators import asyncify from ..tools.decorators import asyncify, once_at_a_time, cancel_once_task
from ..tools.exceptions import NoPeerAvailable from ..tools.exceptions import NoPeerAvailable
from sakia.gui.widgets.busy import Busy from sakia.gui.widgets.busy import Busy
...@@ -55,6 +55,10 @@ class CommunityTile(QFrame): ...@@ -55,6 +55,10 @@ class CommunityTile(QFrame):
if state != self._state: if state != self._state:
self.refresh() self.refresh()
def cancel_refresh(self):
cancel_once_task(self, self.refresh)
@once_at_a_time
@asyncify @asyncify
@asyncio.coroutine @asyncio.coroutine
def refresh(self): def refresh(self):
......
...@@ -29,6 +29,7 @@ class FrameCommunities(QFrame): ...@@ -29,6 +29,7 @@ class FrameCommunities(QFrame):
def refresh(self, app): def refresh(self, app):
for t in self.tiles: for t in self.tiles:
t.cancel_refresh()
t.setParent(None) t.setParent(None)
self.tiles = [] self.tiles = []
if app.current_account: if app.current_account:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment