opt: fav article

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-24 11:04:28 +08:00
parent fcaba24cee
commit 636e083044
3 changed files with 21 additions and 10 deletions

View File

@@ -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);

View File

@@ -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',