From ab6800aba24ef65a332126b4155c94e78b40efe9 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Fri, 23 Oct 2026 03:18:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(search):=20=E9=81=BF=E5=85=8D=E9=94=AE?= =?UTF-8?q?=E7=9B=98=E9=A1=B6=E8=B5=B7=E6=90=9C=E7=B4=A2=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/discover/search_page.dart | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/lib/pages/discover/search_page.dart b/lib/pages/discover/search_page.dart index c5754da..f93779c 100644 --- a/lib/pages/discover/search_page.dart +++ b/lib/pages/discover/search_page.dart @@ -35,9 +35,6 @@ class _SearchPageState extends State { super.initState(); _logic = DiscoverBinding().create(search: context.read()); _logic.addListener(_rebuild); - WidgetsBinding.instance.addPostFrameCallback((_) { - if (mounted) _logic.searchFocus.requestFocus(); - }); } void _rebuild() { @@ -59,21 +56,27 @@ class _SearchPageState extends State { value: SystemUiOverlayStyle.light, child: Theme( data: AppTheme.dark(), - child: Scaffold( - key: const Key('search-page'), - backgroundColor: AppColors.appBackground, - body: SafeArea( - child: Column( - children: [ - _header(l10n), - Expanded( - child: AppPullToRefresh( - key: const Key('search-refresh'), - onRefresh: _logic.refreshSearch, - child: _body(l10n), + child: MediaQuery.removeViewInsets( + context: context, + removeBottom: true, + child: Scaffold( + key: const Key('search-page'), + backgroundColor: AppColors.appBackground, + resizeToAvoidBottomInset: false, + body: SafeArea( + bottom: false, + child: Column( + children: [ + _header(l10n), + Expanded( + child: AppPullToRefresh( + key: const Key('search-refresh'), + onRefresh: _logic.refreshSearch, + child: _body(l10n), + ), ), - ), - ], + ], + ), ), ), ), @@ -157,6 +160,7 @@ class _SearchPageState extends State { focusedBorder: InputBorder.none, contentPadding: EdgeInsets.zero, ), + scrollPadding: EdgeInsets.zero, ), ), if (_logic.searchLoading)