mod: add nav/search debounce option

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-04 21:52:28 +08:00
parent f1433c6e9b
commit 1c0bae600f
5 changed files with 26 additions and 4 deletions

View File

@@ -154,8 +154,10 @@ class _HomePageState extends State<HomePage>
Widget get customAppBar {
return StreamBuilder(
stream: _homeController.hideSearchBar
? _homeController.searchBarStream.stream
.throttle(const Duration(milliseconds: 500))
? _mainController.navSearchStreamDebounce
? _homeController.searchBarStream.stream
.throttle(const Duration(milliseconds: 500))
: _homeController.searchBarStream.stream
: null,
initialData: true,
builder: (BuildContext context, AsyncSnapshot snapshot) {