mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
tweaks (#1788)
* tweak * opt: show bar * opt: crc32 * opt: appsign * opt: Get * opt: compress only if large * opt: wbi * tweak Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
31e5692dff
commit
521ca3ad18
@@ -12,6 +12,7 @@ import 'package:PiliPlus/pages/dynamics/controller.dart';
|
||||
import 'package:PiliPlus/pages/home/controller.dart';
|
||||
import 'package:PiliPlus/pages/mine/view.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/extension/get_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
@@ -30,8 +31,7 @@ class MainController extends GetxController
|
||||
|
||||
List<NavigationBarType> navigationBars = <NavigationBarType>[];
|
||||
|
||||
StreamController<bool>? bottomBarStream;
|
||||
late bool hideTabBar = Pref.hideTabBar;
|
||||
RxBool? bottomBar;
|
||||
late dynamic controller;
|
||||
final RxInt selectedIndex = 0.obs;
|
||||
|
||||
@@ -41,12 +41,10 @@ class MainController extends GetxController
|
||||
late int dynamicPeriod = Pref.dynamicPeriod * 60 * 1000;
|
||||
late int _lastCheckDynamicAt = 0;
|
||||
late bool hasDyn = false;
|
||||
late final DynamicsController dynamicController = Get.put(
|
||||
DynamicsController(),
|
||||
);
|
||||
late final dynamicController = Get.putOrFind(DynamicsController.new);
|
||||
|
||||
late bool hasHome = false;
|
||||
late final HomeController homeController = Get.put(HomeController());
|
||||
late final homeController = Get.putOrFind(HomeController.new);
|
||||
|
||||
late DynamicBadgeMode msgBadgeMode = Pref.msgBadgeMode;
|
||||
late Set<MsgUnReadType> msgUnReadTypes = Pref.msgUnReadTypeV2;
|
||||
@@ -84,8 +82,8 @@ class MainController extends GetxController
|
||||
)
|
||||
: PageController(initialPage: selectedIndex.value);
|
||||
|
||||
if (navigationBars.length > 1 && hideTabBar) {
|
||||
bottomBarStream = StreamController<bool>.broadcast();
|
||||
if (navigationBars.length > 1 && Pref.hideTabBar) {
|
||||
bottomBar = true.obs;
|
||||
}
|
||||
dynamicBadgeMode = DynamicBadgeMode.values[Pref.dynamicBadgeMode];
|
||||
|
||||
@@ -321,13 +319,13 @@ class MainController extends GetxController
|
||||
|
||||
void setSearchBar() {
|
||||
if (hasHome) {
|
||||
homeController.searchBarStream?.add(true);
|
||||
homeController.searchBar?.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
bottomBarStream?.close();
|
||||
bottomBar?.close();
|
||||
controller.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user