Login loading icon

Add standard mechanism in HButton for loading icon display;
have HImage and HIcon base components.
This commit is contained in:
miruka
2019-04-26 21:16:45 -04:00
parent dc2f779d4b
commit 102baccbe5
7 changed files with 72 additions and 35 deletions

View File

@@ -60,14 +60,15 @@ class ClientManager(QObject):
.add_done_callback(lambda _, c=client: self._on_connected(c))
@pyqtSlot(str, str, str)
@pyqtSlot(str, str, str, str)
@pyqtSlot(str, str, str, result="QVariant")
@pyqtSlot(str, str, str, str, result="QVariant")
def new(self, hostname: str, username: str, password: str,
device_id: str = "") -> None:
client = Client(self, hostname, username, device_id)
client.login(password, self.defaultDeviceName)\
.add_done_callback(lambda _: self._on_connected(client))
future = client.login(password, self.defaultDeviceName)
future.add_done_callback(lambda _: self._on_connected(client))
return future
def _on_connected(self, client: Client) -> None:

View File

@@ -33,7 +33,6 @@ class SignalManager(QObject):
def onClientAdded(self, client: Client) -> None:
print(client)
self.connectClient(client)
self.backend.models.accounts.append(User(
userId = client.userId,
@@ -196,7 +195,6 @@ class SignalManager(QObject):
new_event = RoomEvent(type=etype, dateTime=date_time, dict=edict)
if etype == "RoomCreateEvent":
print(room_id, "ff")
self.backend.fully_loaded_rooms.add(room_id)
if self._events_in_transfer: