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 @override
void dispose() { void dispose() {
WidgetsBinding.instance.removeObserver(this); WidgetsBinding.instance.removeObserver(this);
// ignore: discarded_futures
_platformBrightness.close(); _platformBrightness.close();
super.dispose(); super.dispose();

3
packages/neon/lib/src/apps/files/blocs/browser.dart

@ -86,11 +86,8 @@ class FilesBrowserBloc extends $FilesBrowserBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_filesSubject.close(); _filesSubject.close();
// ignore: discarded_futures
_pathSubject.close(); _pathSubject.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); super.dispose();
} }

3
packages/neon/lib/src/apps/files/blocs/files.dart

@ -225,11 +225,8 @@ class FilesBloc extends $FilesBloc {
void dispose() { void dispose() {
_uploadQueue.dispose(); _uploadQueue.dispose();
_downloadQueue.dispose(); _downloadQueue.dispose();
// ignore: discarded_futures
_uploadTasksSubject.close(); _uploadTasksSubject.close();
// ignore: discarded_futures
_downloadTasksSubject.close(); _downloadTasksSubject.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); super.dispose();
} }

4
packages/neon/lib/src/apps/news/blocs/articles.dart

@ -182,13 +182,9 @@ class NewsArticlesBloc extends $NewsArticlesBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_articlesSubject.close(); _articlesSubject.close();
// ignore: discarded_futures
_filterTypeSubject.close(); _filterTypeSubject.close();
// ignore: discarded_futures
_articleUpdateController.close(); _articleUpdateController.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); super.dispose();
} }

3
packages/neon/lib/src/apps/news/blocs/news.dart

@ -226,11 +226,8 @@ class NewsBloc extends $NewsBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_foldersSubject.close(); _foldersSubject.close();
// ignore: discarded_futures
_feedsSubject.close(); _feedsSubject.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); 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 _) { WidgetsBinding.instance.addPostFrameCallback((final _) {
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) { if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) {
// ignore: discarded_futures
Wakelock.enable(); Wakelock.enable();
} }
}); });

2
packages/neon/lib/src/apps/notes/blocs/notes.dart

@ -90,9 +90,7 @@ class NotesBloc extends $NotesBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_notesSubject.close(); _notesSubject.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); super.dispose();
} }

2
packages/neon/lib/src/apps/notifications/blocs/notifications.dart

@ -73,9 +73,7 @@ class NotificationsBloc extends $NotificationsBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_notificationsSubject.close(); _notificationsSubject.close();
// ignore: discarded_futures
_errorsStreamController.close(); _errorsStreamController.close();
super.dispose(); super.dispose();
} }

3
packages/neon/lib/src/blocs/accounts.dart

@ -102,7 +102,6 @@ class AccountsBloc extends $AccountsBloc {
final lastUsedAccountID = _storage.getString(_keyLastUsedAccount); final lastUsedAccountID = _storage.getString(_keyLastUsedAccount);
_activeAccountSubject.add(accounts.singleWhere((final account) => account.id == lastUsedAccountID)); _activeAccountSubject.add(accounts.singleWhere((final account) => account.id == lastUsedAccountID));
} else { } else {
// ignore: discarded_futures
_globalOptions.lastAccount.stream.first.then((final lastAccount) { _globalOptions.lastAccount.stream.first.then((final lastAccount) {
final matches = accounts.where((final account) => account.id == lastAccount).toList(); final matches = accounts.where((final account) => account.id == lastAccount).toList();
if (matches.isNotEmpty) { if (matches.isNotEmpty) {
@ -166,9 +165,7 @@ class AccountsBloc extends $AccountsBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_activeAccountSubject.close(); _activeAccountSubject.close();
// ignore: discarded_futures
_accountsSubject.close(); _accountsSubject.close();
for (final bloc in _userDetailsBlocs.values) { for (final bloc in _userDetailsBlocs.values) {
bloc.dispose(); bloc.dispose();

2
packages/neon/lib/src/blocs/apps.dart

@ -130,9 +130,7 @@ class AppsBloc extends $AppsBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_appsSubject.close(); _appsSubject.close();
// ignore: discarded_futures
_activeAppSubject.close(); _activeAppSubject.close();
for (final key in _blocs.keys) { for (final key in _blocs.keys) {
_blocs[key]!.dispose(); _blocs[key]!.dispose();

1
packages/neon/lib/src/blocs/capabilities.dart

@ -44,7 +44,6 @@ class CapabilitiesBloc extends $CapabilitiesBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_capabilitiesSubject.close(); _capabilitiesSubject.close();
super.dispose(); super.dispose();
} }

4
packages/neon/lib/src/blocs/login.dart

@ -83,13 +83,9 @@ class LoginBloc extends $LoginBloc {
@override @override
void dispose() { void dispose() {
_cancelPollTimer(); _cancelPollTimer();
// ignore: discarded_futures
_serverURLSubject.close(); _serverURLSubject.close();
// ignore: discarded_futures
_serverConnectionStateSubject.close(); _serverConnectionStateSubject.close();
// ignore: discarded_futures
_loginFlowInitSubject.close(); _loginFlowInitSubject.close();
// ignore: discarded_futures
_loginFlowResultSubject.close(); _loginFlowResultSubject.close();
super.dispose(); super.dispose();
} }

1
packages/neon/lib/src/blocs/user_details.dart

@ -41,7 +41,6 @@ class UserDetailsBloc extends $UserDetailsBloc {
@override @override
void dispose() { void dispose() {
// ignore: discarded_futures
_userDetailsSubject.close(); _userDetailsSubject.close();
super.dispose(); super.dispose();
} }

2
packages/neon/lib/src/blocs/user_status.dart

@ -80,9 +80,7 @@ class UserStatusBloc extends $UserStatusBloc {
@override @override
void dispose() { void dispose() {
_cancelTimer(); _cancelTimer();
// ignore: discarded_futures
_activeAccountStreamSubscription.cancel(); _activeAccountStreamSubscription.cancel();
// ignore: discarded_futures
_userStatusSubject.close(); _userStatusSubject.close();
super.dispose(); super.dispose();
} }

1
packages/neon/lib/src/models/account.dart

@ -92,7 +92,6 @@ class AccountSpecificOptions {
} }
void dispose() { void dispose() {
// ignore: discarded_futures
_appIDsSubject.close(); _appIDsSubject.close();
for (final option in options) { for (final option in options) {
option.dispose(); option.dispose();

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

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

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

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

Loading…
Cancel
Save