From 110321d037060d22b768ee83f71e53db23a8f638 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 24 Jul 2022 00:14:18 +0200 Subject: [PATCH] neon, settings: Remove unnecessary ignores --- packages/neon/lib/app.dart | 1 - packages/neon/lib/src/apps/files/blocs/browser.dart | 3 --- packages/neon/lib/src/apps/files/blocs/files.dart | 3 --- packages/neon/lib/src/apps/news/blocs/articles.dart | 4 ---- packages/neon/lib/src/apps/news/blocs/news.dart | 3 --- packages/neon/lib/src/apps/news/pages/article.dart | 1 - packages/neon/lib/src/apps/notes/blocs/notes.dart | 2 -- .../neon/lib/src/apps/notifications/blocs/notifications.dart | 2 -- packages/neon/lib/src/blocs/accounts.dart | 3 --- packages/neon/lib/src/blocs/apps.dart | 2 -- packages/neon/lib/src/blocs/capabilities.dart | 1 - packages/neon/lib/src/blocs/login.dart | 4 ---- packages/neon/lib/src/blocs/user_details.dart | 1 - packages/neon/lib/src/blocs/user_status.dart | 2 -- packages/neon/lib/src/models/account.dart | 1 - packages/settings/lib/src/options/option.dart | 2 -- packages/settings/lib/src/options/select_option.dart | 1 - 17 files changed, 36 deletions(-) diff --git a/packages/neon/lib/app.dart b/packages/neon/lib/app.dart index 8251d3d2..7ba24c58 100644 --- a/packages/neon/lib/app.dart +++ b/packages/neon/lib/app.dart @@ -84,7 +84,6 @@ class _NeonAppState extends State with WidgetsBindingObserver { @override void dispose() { WidgetsBinding.instance.removeObserver(this); - // ignore: discarded_futures _platformBrightness.close(); super.dispose(); diff --git a/packages/neon/lib/src/apps/files/blocs/browser.dart b/packages/neon/lib/src/apps/files/blocs/browser.dart index 9d731666..6b6d4379 100644 --- a/packages/neon/lib/src/apps/files/blocs/browser.dart +++ b/packages/neon/lib/src/apps/files/blocs/browser.dart @@ -86,11 +86,8 @@ class FilesBrowserBloc extends $FilesBrowserBloc { @override void dispose() { - // ignore: discarded_futures _filesSubject.close(); - // ignore: discarded_futures _pathSubject.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/apps/files/blocs/files.dart b/packages/neon/lib/src/apps/files/blocs/files.dart index 39d97aad..a2ea437c 100644 --- a/packages/neon/lib/src/apps/files/blocs/files.dart +++ b/packages/neon/lib/src/apps/files/blocs/files.dart @@ -225,11 +225,8 @@ class FilesBloc extends $FilesBloc { void dispose() { _uploadQueue.dispose(); _downloadQueue.dispose(); - // ignore: discarded_futures _uploadTasksSubject.close(); - // ignore: discarded_futures _downloadTasksSubject.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/apps/news/blocs/articles.dart b/packages/neon/lib/src/apps/news/blocs/articles.dart index f5eca496..016badf1 100644 --- a/packages/neon/lib/src/apps/news/blocs/articles.dart +++ b/packages/neon/lib/src/apps/news/blocs/articles.dart @@ -182,13 +182,9 @@ class NewsArticlesBloc extends $NewsArticlesBloc { @override void dispose() { - // ignore: discarded_futures _articlesSubject.close(); - // ignore: discarded_futures _filterTypeSubject.close(); - // ignore: discarded_futures _articleUpdateController.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/apps/news/blocs/news.dart b/packages/neon/lib/src/apps/news/blocs/news.dart index c91069b2..12503d91 100644 --- a/packages/neon/lib/src/apps/news/blocs/news.dart +++ b/packages/neon/lib/src/apps/news/blocs/news.dart @@ -226,11 +226,8 @@ class NewsBloc extends $NewsBloc { @override void dispose() { - // ignore: discarded_futures _foldersSubject.close(); - // ignore: discarded_futures _feedsSubject.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/apps/news/pages/article.dart b/packages/neon/lib/src/apps/news/pages/article.dart index 12f4893a..0409ca9d 100644 --- a/packages/neon/lib/src/apps/news/pages/article.dart +++ b/packages/neon/lib/src/apps/news/pages/article.dart @@ -39,7 +39,6 @@ class _NewsArticlePageState extends State { WidgetsBinding.instance.addPostFrameCallback((final _) { if (Provider.of(context, listen: false).canUseWakelock) { - // ignore: discarded_futures Wakelock.enable(); } }); diff --git a/packages/neon/lib/src/apps/notes/blocs/notes.dart b/packages/neon/lib/src/apps/notes/blocs/notes.dart index 531a7cd5..52b268c5 100644 --- a/packages/neon/lib/src/apps/notes/blocs/notes.dart +++ b/packages/neon/lib/src/apps/notes/blocs/notes.dart @@ -90,9 +90,7 @@ class NotesBloc extends $NotesBloc { @override void dispose() { - // ignore: discarded_futures _notesSubject.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/apps/notifications/blocs/notifications.dart b/packages/neon/lib/src/apps/notifications/blocs/notifications.dart index 0aedfc5e..6a58d687 100644 --- a/packages/neon/lib/src/apps/notifications/blocs/notifications.dart +++ b/packages/neon/lib/src/apps/notifications/blocs/notifications.dart @@ -73,9 +73,7 @@ class NotificationsBloc extends $NotificationsBloc { @override void dispose() { - // ignore: discarded_futures _notificationsSubject.close(); - // ignore: discarded_futures _errorsStreamController.close(); super.dispose(); } diff --git a/packages/neon/lib/src/blocs/accounts.dart b/packages/neon/lib/src/blocs/accounts.dart index a870f7e2..87c157c9 100644 --- a/packages/neon/lib/src/blocs/accounts.dart +++ b/packages/neon/lib/src/blocs/accounts.dart @@ -102,7 +102,6 @@ class AccountsBloc extends $AccountsBloc { final lastUsedAccountID = _storage.getString(_keyLastUsedAccount); _activeAccountSubject.add(accounts.singleWhere((final account) => account.id == lastUsedAccountID)); } else { - // ignore: discarded_futures _globalOptions.lastAccount.stream.first.then((final lastAccount) { final matches = accounts.where((final account) => account.id == lastAccount).toList(); if (matches.isNotEmpty) { @@ -166,9 +165,7 @@ class AccountsBloc extends $AccountsBloc { @override void dispose() { - // ignore: discarded_futures _activeAccountSubject.close(); - // ignore: discarded_futures _accountsSubject.close(); for (final bloc in _userDetailsBlocs.values) { bloc.dispose(); diff --git a/packages/neon/lib/src/blocs/apps.dart b/packages/neon/lib/src/blocs/apps.dart index 3935742b..05499277 100644 --- a/packages/neon/lib/src/blocs/apps.dart +++ b/packages/neon/lib/src/blocs/apps.dart @@ -130,9 +130,7 @@ class AppsBloc extends $AppsBloc { @override void dispose() { - // ignore: discarded_futures _appsSubject.close(); - // ignore: discarded_futures _activeAppSubject.close(); for (final key in _blocs.keys) { _blocs[key]!.dispose(); diff --git a/packages/neon/lib/src/blocs/capabilities.dart b/packages/neon/lib/src/blocs/capabilities.dart index 2fb8c90a..72e5daec 100644 --- a/packages/neon/lib/src/blocs/capabilities.dart +++ b/packages/neon/lib/src/blocs/capabilities.dart @@ -44,7 +44,6 @@ class CapabilitiesBloc extends $CapabilitiesBloc { @override void dispose() { - // ignore: discarded_futures _capabilitiesSubject.close(); super.dispose(); } diff --git a/packages/neon/lib/src/blocs/login.dart b/packages/neon/lib/src/blocs/login.dart index 3f01a227..81e2e785 100644 --- a/packages/neon/lib/src/blocs/login.dart +++ b/packages/neon/lib/src/blocs/login.dart @@ -83,13 +83,9 @@ class LoginBloc extends $LoginBloc { @override void dispose() { _cancelPollTimer(); - // ignore: discarded_futures _serverURLSubject.close(); - // ignore: discarded_futures _serverConnectionStateSubject.close(); - // ignore: discarded_futures _loginFlowInitSubject.close(); - // ignore: discarded_futures _loginFlowResultSubject.close(); super.dispose(); } diff --git a/packages/neon/lib/src/blocs/user_details.dart b/packages/neon/lib/src/blocs/user_details.dart index c0364e93..c95ec004 100644 --- a/packages/neon/lib/src/blocs/user_details.dart +++ b/packages/neon/lib/src/blocs/user_details.dart @@ -41,7 +41,6 @@ class UserDetailsBloc extends $UserDetailsBloc { @override void dispose() { - // ignore: discarded_futures _userDetailsSubject.close(); super.dispose(); } diff --git a/packages/neon/lib/src/blocs/user_status.dart b/packages/neon/lib/src/blocs/user_status.dart index fe120e5b..d84ebbdc 100644 --- a/packages/neon/lib/src/blocs/user_status.dart +++ b/packages/neon/lib/src/blocs/user_status.dart @@ -80,9 +80,7 @@ class UserStatusBloc extends $UserStatusBloc { @override void dispose() { _cancelTimer(); - // ignore: discarded_futures _activeAccountStreamSubscription.cancel(); - // ignore: discarded_futures _userStatusSubject.close(); super.dispose(); } diff --git a/packages/neon/lib/src/models/account.dart b/packages/neon/lib/src/models/account.dart index 8f6e5947..bd9389a7 100644 --- a/packages/neon/lib/src/models/account.dart +++ b/packages/neon/lib/src/models/account.dart @@ -92,7 +92,6 @@ class AccountSpecificOptions { } void dispose() { - // ignore: discarded_futures _appIDsSubject.close(); for (final option in options) { option.dispose(); diff --git a/packages/settings/lib/src/options/option.dart b/packages/settings/lib/src/options/option.dart index 7d529769..3172acc8 100644 --- a/packages/settings/lib/src/options/option.dart +++ b/packages/settings/lib/src/options/option.dart @@ -35,9 +35,7 @@ abstract class Option { } void dispose() { - // ignore: discarded_futures stream.close(); - // ignore: discarded_futures enabled.close(); } diff --git a/packages/settings/lib/src/options/select_option.dart b/packages/settings/lib/src/options/select_option.dart index 35089d2a..7eb4a763 100644 --- a/packages/settings/lib/src/options/select_option.dart +++ b/packages/settings/lib/src/options/select_option.dart @@ -11,7 +11,6 @@ class SelectOption extends Option { super.enabled, }) { stream = BehaviorSubject(); - // ignore: discarded_futures values.first.then((final vs) async { final valueStr = storage.getString(key); T? initialValue;