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:
@@ -1,5 +1,7 @@
|
||||
import 'package:PiliPlus/common/widgets/dialog.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:get/get.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
@@ -88,9 +90,12 @@ class SSearchController extends GetxController {
|
||||
validateUid();
|
||||
}
|
||||
|
||||
historyList.remove(controller.text);
|
||||
historyList.insert(0, controller.text);
|
||||
GStorage.historyWord.put('cacheList', historyList);
|
||||
if (MineController.anonymity.value.not) {
|
||||
historyList.remove(controller.text);
|
||||
historyList.insert(0, controller.text);
|
||||
GStorage.historyWord.put('cacheList', historyList);
|
||||
}
|
||||
|
||||
searchFocusNode.unfocus();
|
||||
|
||||
await Get.toNamed(
|
||||
|
||||
Reference in New Issue
Block a user