diff --git a/lib/screens/library_browser.dart b/lib/screens/library_browser.dart index d178e309..729be68c 100644 --- a/lib/screens/library_browser.dart +++ b/lib/screens/library_browser.dart @@ -405,6 +405,11 @@ class _LibraryBrowserState extends State items: _getGridItems(currentTopCategory), )); } + // Refocus the search bar after the grid is built. + // Doing it here, because the search bar is rebuilt every time the grid is rebuilt + Provider.of(context, listen: false) + .bookLocatorFocusNode + .requestFocus(); return items; } diff --git a/lib/screens/reading/reading_screen.dart b/lib/screens/reading/reading_screen.dart index 436ad8da..182467e7 100644 --- a/lib/screens/reading/reading_screen.dart +++ b/lib/screens/reading/reading_screen.dart @@ -49,24 +49,7 @@ class _ReadingScreenState extends State return Consumer( builder: (context, appModel, child) { if (appModel.tabs.isEmpty) { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const Padding( - padding: EdgeInsets.all(8.0), - child: Center(child: Text('לא נבחרו ספרים')), - ), - // a button to open the library browser - Center( - child: ElevatedButton( - onPressed: (() => - appModel.currentView.value = Screens.library), - child: const Text('דפדוף בספריה'), - ), - ), - ], - ); + appModel.currentView.value = Screens.library; } return Builder( builder: (context) {