mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: lint
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -72,14 +72,15 @@ class HomeController extends GetxController
|
||||
return controller.onRefresh().catchError((e) => debugPrint(e.toString()));
|
||||
}
|
||||
|
||||
void setTabConfig() async {
|
||||
Future<void> setTabConfig() async {
|
||||
final defaultTabs = [...tabsConfig];
|
||||
final tabbarSort = GStorage.tabbarSort;
|
||||
defaultTabs.retainWhere(
|
||||
(item) => tabbarSort.contains((item['type'] as TabType).name));
|
||||
defaultTabs.sort((a, b) => tabbarSort
|
||||
.indexOf((a['type'] as TabType).name)
|
||||
.compareTo(tabbarSort.indexOf((b['type'] as TabType).name)));
|
||||
defaultTabs
|
||||
..retainWhere(
|
||||
(item) => tabbarSort.contains((item['type'] as TabType).name))
|
||||
..sort((a, b) => tabbarSort
|
||||
.indexOf((a['type'] as TabType).name)
|
||||
.compareTo(tabbarSort.indexOf((b['type'] as TabType).name)));
|
||||
|
||||
tabs = defaultTabs;
|
||||
|
||||
@@ -98,7 +99,7 @@ class HomeController extends GetxController
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void querySearchDefault() async {
|
||||
Future<void> querySearchDefault() async {
|
||||
try {
|
||||
var res = await Request().get(Api.searchDefault);
|
||||
if (res.data['code'] == 0) {
|
||||
@@ -107,7 +108,7 @@ class HomeController extends GetxController
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
showUserInfoDialog(context) {
|
||||
void showUserInfoDialog(context) {
|
||||
feedBack();
|
||||
showDialog(
|
||||
context: context,
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:get/get.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import './controller.dart';
|
||||
import 'package:PiliPlus/pages/home/controller.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:stream_transform/stream_transform.dart';
|
||||
|
||||
@@ -182,8 +182,8 @@ class _HomePageState extends State<HomePage>
|
||||
child: Container(
|
||||
height: 44,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(25)),
|
||||
),
|
||||
child: Material(
|
||||
color: theme.colorScheme.onSecondaryContainer.withOpacity(0.05),
|
||||
@@ -265,8 +265,8 @@ Widget msgBadge(MainController mainController) {
|
||||
isLabelVisible: mainController.msgBadgeMode != DynamicBadgeMode.hidden &&
|
||||
mainController.msgUnReadCount.value.isNotEmpty,
|
||||
alignment: mainController.msgBadgeMode == DynamicBadgeMode.number
|
||||
? Alignment(0, -0.5)
|
||||
: Alignment(0.5, -0.5),
|
||||
? const Alignment(0, -0.5)
|
||||
: const Alignment(0.5, -0.5),
|
||||
label: mainController.msgBadgeMode == DynamicBadgeMode.number &&
|
||||
mainController.msgUnReadCount.value.isNotEmpty
|
||||
? Text(mainController.msgUnReadCount.value.toString())
|
||||
|
||||
Reference in New Issue
Block a user