refactor(navigation): centralize sidebar focus

This commit is contained in:
edde746
2026-07-12 08:42:22 +02:00
parent 1b9ef3b3b6
commit aa230983d5
12 changed files with 104 additions and 11 deletions
@@ -1198,7 +1198,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<MediaItem, LibraryBrows
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
MainScreenFocusScope.focusSidebarOf(context);
}
/// Navigate focus to the alpha jump bar
@@ -252,7 +252,7 @@ class _LibraryCollectionsTabState extends BaseLibraryTabState<MediaItem, Library
}
void _navigateToSidebar() {
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
MainScreenFocusScope.focusSidebarOf(context);
}
@override
@@ -212,7 +212,7 @@ class _LibraryPlaylistsTabState extends BaseLibraryTabState<MediaPlaylist, Libra
}
void _navigateToSidebar() {
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
MainScreenFocusScope.focusSidebarOf(context);
}
@override
@@ -317,7 +317,7 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<MediaHub, LibraryR
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
MainScreenFocusScope.focusSidebarOf(context);
}
// Extra top padding for focus decoration (scale + border extends beyond item bounds)