Skip to content

Commit

Permalink
Fix load previous
Browse files Browse the repository at this point in the history
  • Loading branch information
3003h committed Dec 6, 2024
1 parent d42bd37 commit 2cbaa5c
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 120 deletions.
4 changes: 2 additions & 2 deletions lib/pages/tab/controller/tabview_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ abstract class TabViewController extends GetxController {
change(state, status: RxStatus.success());
logger.d('prevGid: $prevGid, prevPage $prevPage, afterJump: $afterJump');
if ((prevGid.isNotEmpty || prevPage >= 0) && afterJump) {
logger.t('loadPrevious');
logger.d('>>>>> loadPrevious');
await loadPrevious();
} else {
logger.t('reloadData');
logger.d('>>>>> reloadData');
await reloadData();
}
}
Expand Down
22 changes: 11 additions & 11 deletions lib/pages/tab/view/list/tab_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,25 +339,25 @@ Widget getGallerySliverList(
VoidCallback? lastComplete,
Key? key,
Key? centerKey,
int? lastTopitemIndex,
int? lastTopItemIndex,
Rx<ListModeEnum>? listMode,
bool keepPosition = false,
}) {
final EhSettingService ehSettingService = Get.find();
final _key = key ?? ValueKey(galleryProviders.hashCode);

final BlockController _blockController = Get.find();
final BlockController blockController = Get.find();

galleryProviders = galleryProviders?.where((GalleryProvider element) {
return !_blockController.matchRule(
return !blockController.matchRule(
blockType: BlockType.title,
text: element.englishTitle,
) &&
!_blockController.matchRule(
!blockController.matchRule(
blockType: BlockType.title,
text: element.japaneseTitle,
) &&
!_blockController.matchRule(
!blockController.matchRule(
blockType: BlockType.uploader,
text: element.uploader,
);
Expand All @@ -379,7 +379,7 @@ Widget getGallerySliverList(
next: next,
lastComplete: lastComplete,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
keepPosition: keepPosition,
);
case ListModeEnum.waterfall:
Expand All @@ -389,7 +389,7 @@ Widget getGallerySliverList(
next: next,
lastComplete: lastComplete,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
);
case ListModeEnum.waterfallLarge:
return EhWaterfallFlow(
Expand All @@ -399,7 +399,7 @@ Widget getGallerySliverList(
lastComplete: lastComplete,
large: true,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
);
case ListModeEnum.simpleList:
return buildGallerySliverListSimpleView(
Expand All @@ -408,7 +408,7 @@ Widget getGallerySliverList(
next: next,
lastComplete: lastComplete,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
keepPosition: keepPosition,
);
case ListModeEnum.grid:
Expand All @@ -418,7 +418,7 @@ Widget getGallerySliverList(
next: next,
lastComplete: lastComplete,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
);
case ListModeEnum.debugSimple:
return buildDebugSimple(
Expand All @@ -427,7 +427,7 @@ Widget getGallerySliverList(
next: next,
lastComplete: lastComplete,
centerKey: centerKey,
lastTopItemIndex: lastTopitemIndex,
lastTopItemIndex: lastTopItemIndex,
);
case ListModeEnum.global:
return const SliverFillRemaining(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/tab/view/search_image_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class SearchImagePage extends GetView<SearchImageController> {
lastComplete: controller.lastComplete,
// centerKey: centerKey,
key: controller.sliverAnimatedListKey,
lastTopitemIndex: controller.lastTopitemIndex,
lastTopItemIndex: controller.lastTopitemIndex,
);
}

Expand Down
Loading

0 comments on commit 2cbaa5c

Please sign in to comment.