diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index f74aee74..be99b635 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -218,6 +218,7 @@ class _SearchPageState extends State { isHot ? _searchController.loadingState.value : _searchController.recommendData.value, + isHot, )), ], ), @@ -337,7 +338,8 @@ class _SearchPageState extends State { Icon get historyIcon => Icon(Icons.history, color: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.8)); - Widget _buildHotKey(LoadingState loadingState) { + Widget _buildHotKey( + LoadingState loadingState, bool isHot) { return switch (loadingState) { Success() => loadingState.response.list?.isNotEmpty == true ? LayoutBuilder( @@ -350,7 +352,9 @@ class _SearchPageState extends State { : const SizedBox.shrink(), Error() => errorWidget( errMsg: loadingState.errMsg, - callback: _searchController.queryHotSearchList, + callback: isHot + ? _searchController.queryHotSearchList + : _searchController.queryRecommendList, ), _ => const SizedBox.shrink(), }; diff --git a/lib/pages/search/widgets/hot_keyword.dart b/lib/pages/search/widgets/hot_keyword.dart index 16086693..dba17476 100644 --- a/lib/pages/search/widgets/hot_keyword.dart +++ b/lib/pages/search/widgets/hot_keyword.dart @@ -56,6 +56,15 @@ class HotKeyword extends StatelessWidget { height: 15, ), ) + else if (i.showLiveIcon == true) + Padding( + padding: const EdgeInsets.only(left: 4), + child: Image.asset( + 'assets/images/live/live_@28h.gif', + width: 48, + height: 15, + ), + ) ], ), ),