💄 Optimized article attachments displaying strategy

This commit is contained in:
2025-01-05 13:34:37 +08:00
parent bcb176344c
commit c403a2914a
4 changed files with 9 additions and 10 deletions

View File

@ -35,7 +35,7 @@ class WebSocketProvider extends ChangeNotifier {
Future<void> connect({noRetry = false}) async {
if (!_ua.isAuthorized) return;
if (isConnected) {
if (isConnected || conn != null) {
disconnect();
}
@ -97,7 +97,7 @@ class WebSocketProvider extends ChangeNotifier {
onError: (err) {
isConnected = false;
notifyListeners();
Future.delayed(const Duration(seconds: 11), () => connect());
Future.delayed(const Duration(seconds: 1), () => connect());
},
);
}