mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: search history
Closes #488 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -32,7 +32,7 @@ Widget content(context, item, source, callback) {
|
|||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.fromLTRB(12, 0, 12, 6),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MineController extends GetxController {
|
|||||||
RxBool isLogin = false.obs;
|
RxBool isLogin = false.obs;
|
||||||
|
|
||||||
Rx<ThemeType> themeType = ThemeType.system.obs;
|
Rx<ThemeType> themeType = ThemeType.system.obs;
|
||||||
static Box get setting => GStorage.setting;
|
Box get setting => GStorage.setting;
|
||||||
static RxBool anonymity = (Accounts.account.isNotEmpty &&
|
static RxBool anonymity = (Accounts.account.isNotEmpty &&
|
||||||
!Accounts.get(AccountType.heartbeat).isLogin)
|
!Accounts.get(AccountType.heartbeat).isLogin)
|
||||||
.obs;
|
.obs;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
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';
|
||||||
@@ -88,9 +90,12 @@ class SSearchController extends GetxController {
|
|||||||
validateUid();
|
validateUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
historyList.remove(controller.text);
|
if (MineController.anonymity.value.not) {
|
||||||
historyList.insert(0, controller.text);
|
historyList.remove(controller.text);
|
||||||
GStorage.historyWord.put('cacheList', historyList);
|
historyList.insert(0, controller.text);
|
||||||
|
GStorage.historyWord.put('cacheList', historyList);
|
||||||
|
}
|
||||||
|
|
||||||
searchFocusNode.unfocus();
|
searchFocusNode.unfocus();
|
||||||
|
|
||||||
await Get.toNamed(
|
await Get.toNamed(
|
||||||
|
|||||||
Reference in New Issue
Block a user