|
|
@ -10,6 +10,7 @@ import 'package:neon/src/blocs/user_statuses.dart'; |
|
|
|
import 'package:neon/src/models/account.dart'; |
|
|
|
import 'package:neon/src/models/account.dart'; |
|
|
|
import 'package:neon/src/models/app_implementation.dart'; |
|
|
|
import 'package:neon/src/models/app_implementation.dart'; |
|
|
|
import 'package:neon/src/platform/platform.dart'; |
|
|
|
import 'package:neon/src/platform/platform.dart'; |
|
|
|
|
|
|
|
import 'package:neon/src/router.dart'; |
|
|
|
import 'package:neon/src/settings/models/storage.dart'; |
|
|
|
import 'package:neon/src/settings/models/storage.dart'; |
|
|
|
import 'package:neon/src/utils/account_options.dart'; |
|
|
|
import 'package:neon/src/utils/account_options.dart'; |
|
|
|
import 'package:neon/src/utils/global_options.dart'; |
|
|
|
import 'package:neon/src/utils/global_options.dart'; |
|
|
@ -63,6 +64,10 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState |
|
|
|
this._globalOptions, |
|
|
|
this._globalOptions, |
|
|
|
this._allAppImplementations, |
|
|
|
this._allAppImplementations, |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
router = AppRouter( |
|
|
|
|
|
|
|
accountsBloc: this, |
|
|
|
|
|
|
|
appImplementations: _allAppImplementations, |
|
|
|
|
|
|
|
); |
|
|
|
accounts |
|
|
|
accounts |
|
|
|
..add(loadAccounts(_storage)) |
|
|
|
..add(loadAccounts(_storage)) |
|
|
|
..listen((final as) async { |
|
|
|
..listen((final as) async { |
|
|
@ -105,6 +110,7 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState |
|
|
|
final SharedPreferences _sharedPreferences; |
|
|
|
final SharedPreferences _sharedPreferences; |
|
|
|
final GlobalOptions _globalOptions; |
|
|
|
final GlobalOptions _globalOptions; |
|
|
|
final Iterable<AppImplementation> _allAppImplementations; |
|
|
|
final Iterable<AppImplementation> _allAppImplementations; |
|
|
|
|
|
|
|
late final AppRouter router; |
|
|
|
final _keyLastUsedAccount = 'last-used-account'; |
|
|
|
final _keyLastUsedAccount = 'last-used-account'; |
|
|
|
|
|
|
|
|
|
|
|
final _accountsOptions = <String, AccountSpecificOptions>{}; |
|
|
|
final _accountsOptions = <String, AccountSpecificOptions>{}; |
|
|
@ -239,6 +245,7 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState |
|
|
|
this, |
|
|
|
this, |
|
|
|
account, |
|
|
|
account, |
|
|
|
_allAppImplementations, |
|
|
|
_allAppImplementations, |
|
|
|
|
|
|
|
router, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|