mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
@@ -19,8 +19,7 @@ class HomeController extends GetxController
|
||||
late List<HomeTabType> tabs;
|
||||
late TabController tabController;
|
||||
|
||||
RxBool? searchBar;
|
||||
final bool useSideBar = Pref.useSideBar;
|
||||
RxBool? showSearchBar;
|
||||
|
||||
bool enableSearchWord = Pref.enableSearchWord;
|
||||
late final RxString defaultSearch = ''.obs;
|
||||
@@ -37,8 +36,8 @@ class HomeController extends GetxController
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
if (Pref.hideSearchBar) {
|
||||
searchBar = true.obs;
|
||||
if (!Pref.useSideBar && Pref.hideTopBar) {
|
||||
showSearchBar = true.obs;
|
||||
}
|
||||
|
||||
if (enableSearchWord) {
|
||||
|
||||
@@ -32,7 +32,7 @@ class _HomePageState extends State<HomePage>
|
||||
final theme = Theme.of(context);
|
||||
return Column(
|
||||
children: [
|
||||
if (!_homeController.useSideBar &&
|
||||
if (!_mainController.useSideBar &&
|
||||
MediaQuery.sizeOf(context).isPortrait)
|
||||
customAppBar(theme),
|
||||
if (_homeController.tabs.length > 1)
|
||||
@@ -87,7 +87,7 @@ class _HomePageState extends State<HomePage>
|
||||
userAvatar(theme: theme, mainController: _mainController),
|
||||
],
|
||||
);
|
||||
if (_homeController.searchBar case final searchBar?) {
|
||||
if (_homeController.showSearchBar case final searchBar?) {
|
||||
return Obx(() {
|
||||
final showSearchBar = searchBar.value;
|
||||
return AnimatedOpacity(
|
||||
|
||||
Reference in New Issue
Block a user