mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: fav article
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -489,7 +489,7 @@ class UserHttp {
|
||||
'page': page,
|
||||
});
|
||||
if (res.data['code'] == 0) {
|
||||
return LoadingState.success(res.data['data']?['items']);
|
||||
return LoadingState.success(res.data['data']);
|
||||
} else {
|
||||
return LoadingState.error(res.data['message']);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,19 @@ class FavArticleController extends CommonListController {
|
||||
queryData();
|
||||
}
|
||||
|
||||
@override
|
||||
List? getDataList(response) {
|
||||
return response?['items'];
|
||||
}
|
||||
|
||||
@override
|
||||
bool customHandleResponse(bool isRefresh, Success response) {
|
||||
if (response.response?['has_more'] == false) {
|
||||
isEnd = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<LoadingState> customGetData() =>
|
||||
UserHttp.favArticle(page: currentPage);
|
||||
|
||||
@@ -73,15 +73,13 @@ class FavArticleItem extends StatelessWidget {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
value: item['stat']['view'] == ''
|
||||
? 0
|
||||
: item['stat']['view'],
|
||||
goto: 'picture',
|
||||
textColor: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
// StatView(
|
||||
// context: context,
|
||||
// value: item['stat']['view'],
|
||||
// goto: 'picture',
|
||||
// textColor: Theme.of(context).colorScheme.outline,
|
||||
// ),
|
||||
// const SizedBox(width: 16),
|
||||
StatView(
|
||||
context: context,
|
||||
goto: 'like',
|
||||
|
||||
Reference in New Issue
Block a user