Make login button work for login page
This commit is contained in:
@@ -115,8 +115,7 @@ class Client(QObject):
|
||||
self.net_sync.http_disconnect()
|
||||
|
||||
|
||||
@pyqtSlot()
|
||||
@futurize()
|
||||
@futurize(pyqt=False)
|
||||
def startSyncing(self) -> None:
|
||||
while True:
|
||||
self._on_sync(self.net_sync.talk(
|
||||
|
@@ -61,7 +61,7 @@ class ClientManager(QObject):
|
||||
|
||||
|
||||
@pyqtSlot(str, str, str)
|
||||
@pyqtSlot(str, str, str)
|
||||
@pyqtSlot(str, str, str, str)
|
||||
def new(self, hostname: str, username: str, password: str,
|
||||
device_id: str = "") -> None:
|
||||
|
||||
|
@@ -67,7 +67,8 @@ class PyQtFuture(QObject):
|
||||
_RUNNING: List[Tuple[Executor, Callable, tuple, dict]] = []
|
||||
|
||||
|
||||
def futurize(max_instances: Optional[int] = None) -> Callable:
|
||||
def futurize(max_instances: Optional[int] = None, pyqt: bool = True
|
||||
) -> Callable:
|
||||
|
||||
def decorator(func: Callable) -> Callable:
|
||||
|
||||
@@ -89,7 +90,8 @@ def futurize(max_instances: Optional[int] = None) -> Callable:
|
||||
return None
|
||||
|
||||
_RUNNING.append((self.pool, func, args, kws))
|
||||
return PyQtFuture(self.pool.submit(run_and_catch_errs), self)
|
||||
future = self.pool.submit(run_and_catch_errs)
|
||||
return PyQtFuture(future, self) if pyqt else future
|
||||
|
||||
return wrapper
|
||||
|
||||
|
@@ -33,6 +33,7 @@ class SignalManager(QObject):
|
||||
|
||||
|
||||
def onClientAdded(self, client: Client) -> None:
|
||||
print(client)
|
||||
self.connectClient(client)
|
||||
self.backend.models.accounts.append(User(
|
||||
userId = client.userId,
|
||||
|
Reference in New Issue
Block a user