💄 Optimize the explore page app bar behavior

This commit is contained in:
2024-10-10 23:36:07 +08:00
parent 382e3c4a4c
commit af7cc8dab0
5 changed files with 101 additions and 66 deletions

View File

@ -28,11 +28,11 @@ class PostProvider extends GetConnect {
}
Future<Response> listRecommendations(int page,
{String? realm, String? channel}) async {
{String? realm, String? channel, int take = 10}) async {
GetConnect client;
final AuthProvider auth = Get.find();
final queries = [
'take=${10}',
'take=$take',
'offset=$page',
if (realm != null) 'realm=$realm',
];
@ -71,9 +71,9 @@ class PostProvider extends GetConnect {
}
Future<Response> listPost(int page,
{String? realm, String? author, tag, category}) async {
{String? realm, String? author, tag, category, int take = 10}) async {
final queries = [
'take=${10}',
'take=$take',
'offset=$page',
if (tag != null) 'tag=$tag',
if (category != null) 'category=$category',