mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 00:58:19 +08:00
some modifitions (#636)
* opt: MsgUnReadTypeV2 * mod: recoard history in anonymity mode
This commit is contained in:
committed by
GitHub
parent
82d615fbbf
commit
af289c533f
@@ -259,7 +259,7 @@ class DefaultUser extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget msgBadge(mainController) {
|
Widget msgBadge(MainController mainController) {
|
||||||
void toWhisper() {
|
void toWhisper() {
|
||||||
mainController.msgUnReadCount.value = '';
|
mainController.msgUnReadCount.value = '';
|
||||||
mainController.lastCheckUnreadAt = DateTime.now().millisecondsSinceEpoch;
|
mainController.lastCheckUnreadAt = DateTime.now().millisecondsSinceEpoch;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class MainController extends GetxController {
|
|||||||
|
|
||||||
late int homeIndex = -1;
|
late int homeIndex = -1;
|
||||||
late DynamicBadgeMode msgBadgeMode = GStorage.msgBadgeMode;
|
late DynamicBadgeMode msgBadgeMode = GStorage.msgBadgeMode;
|
||||||
late Set<MsgUnReadType> msgUnReadTypes = GStorage.msgUnReadTypeV2.toSet();
|
late Set<MsgUnReadType> msgUnReadTypes = GStorage.msgUnReadTypeV2;
|
||||||
late final RxString msgUnReadCount = ''.obs;
|
late final RxString msgUnReadCount = ''.obs;
|
||||||
late int lastCheckUnreadAt = 0;
|
late int lastCheckUnreadAt = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import 'package:PiliPlus/common/widgets/dialog.dart';
|
import 'package:PiliPlus/common/widgets/dialog.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/pages/mine/controller.dart';
|
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
@@ -94,7 +92,7 @@ class SSearchController extends GetxController {
|
|||||||
validateUid();
|
validateUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MineController.anonymity.value.not && recordSearchHistory.value) {
|
if (recordSearchHistory.value) {
|
||||||
historyList.remove(controller.text);
|
historyList.remove(controller.text);
|
||||||
historyList.insert(0, controller.text);
|
historyList.insert(0, controller.text);
|
||||||
GStorage.historyWord.put('cacheList', historyList);
|
GStorage.historyWord.put('cacheList', historyList);
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ class GStorage {
|
|||||||
defaultValue: DynamicBadgeMode.number.index,
|
defaultValue: DynamicBadgeMode.number.index,
|
||||||
)];
|
)];
|
||||||
|
|
||||||
static List<MsgUnReadType> get msgUnReadTypeV2 => List<int>.from(setting.get(
|
static Set<MsgUnReadType> get msgUnReadTypeV2 =>
|
||||||
SettingBoxKey.msgUnReadTypeV2,
|
(setting.get(SettingBoxKey.msgUnReadTypeV2) as List?)
|
||||||
defaultValue:
|
?.map((index) => MsgUnReadType.values[index])
|
||||||
List<int>.generate(MsgUnReadType.values.length, (index) => index),
|
.toSet() ??
|
||||||
)).map((index) => MsgUnReadType.values[index]).toList();
|
MsgUnReadType.values.toSet();
|
||||||
|
|
||||||
static int get defaultHomePage =>
|
static int get defaultHomePage =>
|
||||||
setting.get(SettingBoxKey.defaultHomePage, defaultValue: 0);
|
setting.get(SettingBoxKey.defaultHomePage, defaultValue: 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user