refactor: Remove unused html onfocus streams

This commit is contained in:
Christian Kußowski 2025-12-24 13:14:28 +01:00
commit 7aedd78429
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 0 additions and 15 deletions

View file

@ -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();