From 29a1bcf91c92620bb4ae6a70dd86245b92cd7065 Mon Sep 17 00:00:00 2001 From: Elias Bonnici Date: Fri, 5 Apr 2024 15:13:13 +0200 Subject: [PATCH] Ensure initial currentSection is `Section.Home` for Android This ensures that the Home `NavigationItem` is not disabled. --- lib/android/init.dart | 8 ++------ lib/android/state.dart | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/android/init.dart b/lib/android/init.dart index 0d9731d6..d0715b03 100644 --- a/lib/android/init.dart +++ b/lib/android/init.dart @@ -93,12 +93,8 @@ Future initialize() async { ]), // this specifies the priority of sections to show when // the connected YubiKey does not support current section - androidSectionPriority.overrideWithValue([ - Section.accounts, - Section.fingerprints, - Section.passkeys, - Section.home - ]), + androidSectionPriority.overrideWithValue( + [Section.accounts, Section.fingerprints, Section.passkeys]), supportedThemesProvider.overrideWith( (ref) => ref.watch(androidSupportedThemesProvider), ), diff --git a/lib/android/state.dart b/lib/android/state.dart index 9b5fa39e..34437cb9 100644 --- a/lib/android/state.dart +++ b/lib/android/state.dart @@ -121,7 +121,7 @@ class AndroidCurrentSectionNotifier extends CurrentSectionNotifier { AndroidCurrentSectionNotifier( this._supportedSectionsByPriority, this._appContextHandler, - ) : super(Section.accounts); + ) : super(Section.home); @override void setCurrentSection(Section section) {