mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 10:06:23 +08:00
merge mine & media
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -5,9 +5,7 @@ import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
import 'package:PiliPlus/models/common/home_tab_type.dart';
|
||||
import 'package:PiliPlus/pages/common/common_controller.dart';
|
||||
import 'package:PiliPlus/pages/mine/view.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -83,17 +81,6 @@ class HomeController extends GetxController
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
void showUserInfoDialog(BuildContext context) {
|
||||
feedBack();
|
||||
showDialog(
|
||||
context: context,
|
||||
useSafeArea: true,
|
||||
builder: (context) => const Dialog(
|
||||
child: MinePage(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
searchBarStream?.close();
|
||||
|
||||
@@ -104,8 +104,7 @@ class _HomePageState extends State<HomePage>
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
onTap: () =>
|
||||
_homeController.showUserInfoDialog(context),
|
||||
onTap: _mainController.toMinePage,
|
||||
splashColor: theme.colorScheme.primaryContainer
|
||||
.withValues(alpha: 0.3),
|
||||
customBorder: const CircleBorder(),
|
||||
@@ -141,8 +140,7 @@ class _HomePageState extends State<HomePage>
|
||||
)
|
||||
: defaultUser(
|
||||
theme: theme,
|
||||
onPressed: () =>
|
||||
_homeController.showUserInfoDialog(context),
|
||||
onPressed: _mainController.toMinePage,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -235,9 +233,9 @@ Widget defaultUser({
|
||||
tooltip: '默认用户头像',
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
backgroundColor: WidgetStateProperty.resolveWith((states) {
|
||||
return theme.colorScheme.onInverseSurface;
|
||||
}),
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
theme.colorScheme.onInverseSurface,
|
||||
),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
icon: Icon(
|
||||
|
||||
Reference in New Issue
Block a user