Browse Source

neon, settings: Remove unnecessary ignores

pull/37/head
jld3103 2 years ago
parent
commit
110321d037
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 1
      packages/neon/lib/app.dart
  2. 3
      packages/neon/lib/src/apps/files/blocs/browser.dart
  3. 3
      packages/neon/lib/src/apps/files/blocs/files.dart
  4. 4
      packages/neon/lib/src/apps/news/blocs/articles.dart
  5. 3
      packages/neon/lib/src/apps/news/blocs/news.dart
  6. 1
      packages/neon/lib/src/apps/news/pages/article.dart
  7. 2
      packages/neon/lib/src/apps/notes/blocs/notes.dart
  8. 2
      packages/neon/lib/src/apps/notifications/blocs/notifications.dart
  9. 3
      packages/neon/lib/src/blocs/accounts.dart
  10. 2
      packages/neon/lib/src/blocs/apps.dart
  11. 1
      packages/neon/lib/src/blocs/capabilities.dart
  12. 4
      packages/neon/lib/src/blocs/login.dart
  13. 1
      packages/neon/lib/src/blocs/user_details.dart
  14. 2
      packages/neon/lib/src/blocs/user_status.dart
  15. 1
      packages/neon/lib/src/models/account.dart
  16. 2
      packages/settings/lib/src/options/option.dart
  17. 1
      packages/settings/lib/src/options/select_option.dart

1
packages/neon/lib/app.dart

@ -84,7 +84,6 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver {
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
// ignore: discarded_futures
_platformBrightness.close();
super.dispose();

3
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();
}

3
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();
}

4
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();
}

3
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();
}

1
packages/neon/lib/src/apps/news/pages/article.dart

@ -39,7 +39,6 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
WidgetsBinding.instance.addPostFrameCallback((final _) {
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) {
// ignore: discarded_futures
Wakelock.enable();
}
});

2
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();
}

2
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();
}

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

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

1
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();
}

4
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();
}

1
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();
}

2
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();
}

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

2
packages/settings/lib/src/options/option.dart

@ -35,9 +35,7 @@ abstract class Option<T> {
}
void dispose() {
// ignore: discarded_futures
stream.close();
// ignore: discarded_futures
enabled.close();
}

1
packages/settings/lib/src/options/select_option.dart

@ -11,7 +11,6 @@ class SelectOption<T> extends Option<T> {
super.enabled,
}) {
stream = BehaviorSubject();
// ignore: discarded_futures
values.first.then((final vs) async {
final valueStr = storage.getString(key);
T? initialValue;

Loading…
Cancel
Save