diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index f3fccb6e..d4cdeeec 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -43,25 +43,27 @@ class _HomePageState extends State if (!_homeController.useSideBar) customAppBar, if (_homeController.tabs.length > 1) ...[ const SizedBox(height: 4), - Container( - height: 42, + Material( color: Theme.of(context).colorScheme.surface, - child: TabBar( - controller: _homeController.tabController, - tabs: [ - for (var i in _homeController.tabs) Tab(text: i['label']) - ], - isScrollable: true, - dividerColor: Colors.transparent, - enableFeedback: true, - splashBorderRadius: BorderRadius.circular(10), - tabAlignment: TabAlignment.center, - onTap: (value) { - feedBack(); - if (_homeController.tabController.indexIsChanging.not) { - _homeController.animateToTop(); - } - }, + child: SizedBox( + height: 42, + child: TabBar( + controller: _homeController.tabController, + tabs: [ + for (var i in _homeController.tabs) Tab(text: i['label']) + ], + isScrollable: true, + dividerColor: Colors.transparent, + enableFeedback: true, + splashBorderRadius: BorderRadius.circular(10), + tabAlignment: TabAlignment.center, + onTap: (value) { + feedBack(); + if (_homeController.tabController.indexIsChanging.not) { + _homeController.animateToTop(); + } + }, + ), ), ), ] else diff --git a/lib/pages/rcmd/controller.dart b/lib/pages/rcmd/controller.dart index 2d889b40..ec39953d 100644 --- a/lib/pages/rcmd/controller.dart +++ b/lib/pages/rcmd/controller.dart @@ -39,7 +39,7 @@ class RcmdController extends CommonController { bool shouldSaveLast = enableSaveLastData && currentPage == 0; if (shouldSaveLast) { int length = currentList.length; - shouldSaveLast = shouldSaveLast && length > 0 && length < 500; + shouldSaveLast = length > 0 && length < 500; } lastRefreshAt = shouldSaveLast && savedRcmdTip ? dataList.length : null; return shouldSaveLast ? dataList + currentList : null; diff --git a/lib/pages/setting/widgets/model.dart b/lib/pages/setting/widgets/model.dart index 6918c178..bcdfa185 100644 --- a/lib/pages/setting/widgets/model.dart +++ b/lib/pages/setting/widgets/model.dart @@ -1136,7 +1136,11 @@ List get recommendSettings => [ defaultVal: true, onChanged: (value) { try { - Get.find().savedRcmdTip = value; + RcmdController ctr = Get.find(); + ctr.savedRcmdTip = value; + if (value.not) { + ctr.lastRefreshAt = null; + } } catch (e) { debugPrint('$e'); }