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,
|
'page': page,
|
||||||
});
|
});
|
||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
return LoadingState.success(res.data['data']?['items']);
|
return LoadingState.success(res.data['data']);
|
||||||
} else {
|
} else {
|
||||||
return LoadingState.error(res.data['message']);
|
return LoadingState.error(res.data['message']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,19 @@ class FavArticleController extends CommonListController {
|
|||||||
queryData();
|
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
|
@override
|
||||||
Future<LoadingState> customGetData() =>
|
Future<LoadingState> customGetData() =>
|
||||||
UserHttp.favArticle(page: currentPage);
|
UserHttp.favArticle(page: currentPage);
|
||||||
|
|||||||
@@ -73,15 +73,13 @@ class FavArticleItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
StatView(
|
// StatView(
|
||||||
context: context,
|
// context: context,
|
||||||
value: item['stat']['view'] == ''
|
// value: item['stat']['view'],
|
||||||
? 0
|
// goto: 'picture',
|
||||||
: item['stat']['view'],
|
// textColor: Theme.of(context).colorScheme.outline,
|
||||||
goto: 'picture',
|
// ),
|
||||||
textColor: Theme.of(context).colorScheme.outline,
|
// const SizedBox(width: 16),
|
||||||
),
|
|
||||||
const SizedBox(width: 16),
|
|
||||||
StatView(
|
StatView(
|
||||||
context: context,
|
context: context,
|
||||||
goto: 'like',
|
goto: 'like',
|
||||||
|
|||||||
Reference in New Issue
Block a user