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