Add configurable scroll threshold (#910)

* Add configurable scroll threshold

* update

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
Tong xuewen
2025-07-29 23:02:05 +08:00
committed by GitHub
parent cf403aaf78
commit 3eb9c5b8ba
8 changed files with 191 additions and 103 deletions

View File

@@ -123,7 +123,6 @@ class SettingBoxKey {
appFontWeight = 'appFontWeight',
fastForBackwardDuration = 'fastForBackwardDuration',
recordSearchHistory = 'recordSearchHistory',
navSearchStreamDebounce = 'navSearchStreamDebounce',
showPgcTimeline = 'showPgcTimeline',
pageTransition = 'pageTransition',
optTabletNav = 'optTabletNav',
@@ -194,6 +193,8 @@ class SettingBoxKey {
enableMYBar = 'enableMYBar',
hideSearchBar = 'hideSearchBar',
hideTabBar = 'hideTabBar',
scrollThreshold = 'scrollThreshold',
enableScrollThreshold = 'enableScrollThreshold',
tabBarSort = 'tabBarSort',
dynamicBadgeMode = 'dynamicBadgeMode',
msgBadgeMode = 'msgBadgeMode',

View File

@@ -502,9 +502,6 @@ class Pref {
static bool get recordSearchHistory =>
_setting.get(SettingBoxKey.recordSearchHistory, defaultValue: true);
static bool get navSearchStreamDebounce =>
_setting.get(SettingBoxKey.navSearchStreamDebounce, defaultValue: false);
static String get webdavUri =>
_setting.get(SettingBoxKey.webdavUri, defaultValue: '');
@@ -607,6 +604,12 @@ class Pref {
static bool get hideSearchBar =>
_setting.get(SettingBoxKey.hideSearchBar, defaultValue: true);
static bool get enableScrollThreshold =>
_setting.get(SettingBoxKey.enableScrollThreshold, defaultValue: true);
static double get scrollThreshold =>
_setting.get(SettingBoxKey.scrollThreshold, defaultValue: 50.0);
static bool get enableSearchWord =>
_setting.get(SettingBoxKey.enableSearchWord, defaultValue: true);