mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: trending
This commit is contained in:
@@ -218,6 +218,7 @@ class _SearchPageState extends State<SearchPage> {
|
||||
isHot
|
||||
? _searchController.loadingState.value
|
||||
: _searchController.recommendData.value,
|
||||
isHot,
|
||||
)),
|
||||
],
|
||||
),
|
||||
@@ -337,7 +338,8 @@ class _SearchPageState extends State<SearchPage> {
|
||||
Icon get historyIcon => Icon(Icons.history,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.8));
|
||||
|
||||
Widget _buildHotKey(LoadingState<SearchKeywordData> loadingState) {
|
||||
Widget _buildHotKey(
|
||||
LoadingState<SearchKeywordData> loadingState, bool isHot) {
|
||||
return switch (loadingState) {
|
||||
Success() => loadingState.response.list?.isNotEmpty == true
|
||||
? LayoutBuilder(
|
||||
@@ -350,7 +352,9 @@ class _SearchPageState extends State<SearchPage> {
|
||||
: const SizedBox.shrink(),
|
||||
Error() => errorWidget(
|
||||
errMsg: loadingState.errMsg,
|
||||
callback: _searchController.queryHotSearchList,
|
||||
callback: isHot
|
||||
? _searchController.queryHotSearchList
|
||||
: _searchController.queryRecommendList,
|
||||
),
|
||||
_ => const SizedBox.shrink(),
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user