refactor: Remove unused html onfocus streams
This commit is contained in:
parent
040c18d80f
commit
7aedd78429
2 changed files with 0 additions and 15 deletions
|
|
@ -14,7 +14,6 @@ import 'package:go_router/go_router.dart';
|
|||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:scroll_to_index/scroll_to_index.dart';
|
||||
import 'package:universal_html/html.dart' as html;
|
||||
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
|
|
@ -112,7 +111,6 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
final AutoScrollController scrollController = AutoScrollController();
|
||||
|
||||
late final FocusNode inputFocus;
|
||||
StreamSubscription<html.Event>? onFocusSub;
|
||||
|
||||
Timer? typingCoolDown;
|
||||
Timer? typingTimeout;
|
||||
|
|
@ -372,9 +370,6 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
: '';
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
_tryLoadTimeline();
|
||||
if (kIsWeb) {
|
||||
onFocusSub = html.window.onFocus.listen((_) => setReadMarker());
|
||||
}
|
||||
}
|
||||
|
||||
final Set<String> expandedEventIds = {};
|
||||
|
|
@ -557,7 +552,6 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
timeline?.cancelSubscriptions();
|
||||
timeline = null;
|
||||
inputFocus.removeListener(_inputFocusListener);
|
||||
onFocusSub?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,8 +181,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
final onNotification = <String, StreamSubscription>{};
|
||||
final onLoginStateChanged = <String, StreamSubscription<LoginState>>{};
|
||||
final onUiaRequest = <String, StreamSubscription<UiaRequest>>{};
|
||||
StreamSubscription<html.Event>? onFocusSub;
|
||||
StreamSubscription<html.Event>? onBlurSub;
|
||||
|
||||
String? _cachedPassword;
|
||||
Timer? _cachedPasswordClearTimer;
|
||||
|
|
@ -313,11 +311,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
_registerSubs(c.clientName);
|
||||
}
|
||||
|
||||
if (kIsWeb) {
|
||||
onFocusSub = html.window.onFocus.listen((_) => webHasFocus = true);
|
||||
onBlurSub = html.window.onBlur.listen((_) => webHasFocus = false);
|
||||
}
|
||||
|
||||
if (PlatformInfos.isMobile) {
|
||||
backgroundPush = BackgroundPush(
|
||||
this,
|
||||
|
|
@ -387,8 +380,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
onLoginStateChanged.values.map((s) => s.cancel());
|
||||
onNotification.values.map((s) => s.cancel());
|
||||
client.httpClient.close();
|
||||
onFocusSub?.cancel();
|
||||
onBlurSub?.cancel();
|
||||
|
||||
linuxNotifications?.close();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue