mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 13:43:56 +08:00
@@ -4,8 +4,7 @@ import 'package:PiliPlus/grpc/im.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msgfeed_unread.dart';
|
||||
import 'package:PiliPlus/pages/common/common_whisper_controller.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/foundation.dart' show listEquals;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:protobuf/protobuf.dart' show PbMap;
|
||||
@@ -14,8 +13,7 @@ class WhisperController extends CommonWhisperController<SessionMainReply> {
|
||||
@override
|
||||
SessionPageType sessionPageType = SessionPageType.SESSION_PAGE_TYPE_HOME;
|
||||
|
||||
late final List<({bool enabled, IconData icon, String name, String route})>
|
||||
msgFeedTopItems;
|
||||
late final List<({IconData icon, String name, String route})> msgFeedTopItems;
|
||||
late final RxList<int> unreadCounts;
|
||||
|
||||
PbMap<int, Offset>? offset;
|
||||
@@ -31,25 +29,21 @@ class WhisperController extends CommonWhisperController<SessionMainReply> {
|
||||
name: "回复我的",
|
||||
icon: Icons.message_outlined,
|
||||
route: "/replyMe",
|
||||
enabled: true,
|
||||
),
|
||||
const (
|
||||
name: "@我",
|
||||
icon: Icons.alternate_email_outlined,
|
||||
route: "/atMe",
|
||||
enabled: true,
|
||||
),
|
||||
(
|
||||
name: "收到的赞",
|
||||
icon: Icons.favorite_border_outlined,
|
||||
route: "/likeMe",
|
||||
enabled: !Pref.disableLikeMsg,
|
||||
),
|
||||
const (
|
||||
name: "系统通知",
|
||||
icon: Icons.notifications_none_outlined,
|
||||
route: "/sysMsg",
|
||||
enabled: true,
|
||||
),
|
||||
];
|
||||
unreadCounts = List.filled(msgFeedTopItems.length, 0).obs;
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/three_dot_ext.dart';
|
||||
import 'package:PiliPlus/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class WhisperPage extends StatefulWidget {
|
||||
@@ -194,10 +193,6 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (!item.enabled) {
|
||||
SmartDialog.showToast('已禁用');
|
||||
return;
|
||||
}
|
||||
_controller.unreadCounts[index] = 0;
|
||||
Get.toNamed(item.route);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user