Link preview

This commit is contained in:
2024-12-14 14:46:11 +08:00
parent b750cc3c67
commit 1f8d47f6c3
13 changed files with 752 additions and 16 deletions

View File

@ -26,6 +26,7 @@ class WebSocketProvider extends ChangeNotifier {
}
Future<void> tryConnect() async {
if (isConnected) return;
if (!_ua.isAuthorized) return;
log('[WebSocket] Connecting to the server...');
@ -76,6 +77,7 @@ class WebSocketProvider extends ChangeNotifier {
if (conn != null) {
conn!.sink.close();
}
conn = null;
isConnected = false;
notifyListeners();
}