Ensure initial currentSection is Section.Home for Android

This ensures that the Home `NavigationItem` is not disabled.
This commit is contained in:
Elias Bonnici 2024-04-05 15:13:13 +02:00
parent de99f6bd32
commit 29a1bcf91c
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
2 changed files with 3 additions and 7 deletions

View File

@ -93,12 +93,8 @@ Future<Widget> initialize() async {
]), ]),
// this specifies the priority of sections to show when // this specifies the priority of sections to show when
// the connected YubiKey does not support current section // the connected YubiKey does not support current section
androidSectionPriority.overrideWithValue([ androidSectionPriority.overrideWithValue(
Section.accounts, [Section.accounts, Section.fingerprints, Section.passkeys]),
Section.fingerprints,
Section.passkeys,
Section.home
]),
supportedThemesProvider.overrideWith( supportedThemesProvider.overrideWith(
(ref) => ref.watch(androidSupportedThemesProvider), (ref) => ref.watch(androidSupportedThemesProvider),
), ),

View File

@ -121,7 +121,7 @@ class AndroidCurrentSectionNotifier extends CurrentSectionNotifier {
AndroidCurrentSectionNotifier( AndroidCurrentSectionNotifier(
this._supportedSectionsByPriority, this._supportedSectionsByPriority,
this._appContextHandler, this._appContextHandler,
) : super(Section.accounts); ) : super(Section.home);
@override @override
void setCurrentSection(Section section) { void setCurrentSection(Section section) {