mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-24 11:10:15 +08:00
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart' show ReloadMixin;
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
||||
import 'package:flutter/widgets.dart' show ScrollController;
|
||||
@@ -50,3 +51,14 @@ abstract class CommonController<R, T> extends GetxController
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
mixin CommonReloadMixin<R, T> on CommonController<R, T> implements ReloadMixin {
|
||||
@override
|
||||
late bool reload = false;
|
||||
|
||||
@override
|
||||
Future<void> onReload() {
|
||||
reload = true;
|
||||
return super.onReload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,10 +121,7 @@ mixin CommonDynPageMixin<T extends StatefulWidget>
|
||||
|
||||
Widget replyList(LoadingState<List<ReplyInfo>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => SliverList.builder(
|
||||
itemCount: 12,
|
||||
itemBuilder: (context, index) => const VideoReplySkeleton(),
|
||||
),
|
||||
Loading() => replySkeleton,
|
||||
Success(:final response) =>
|
||||
response != null && response.isNotEmpty
|
||||
? SliverList.builder(
|
||||
|
||||
Reference in New Issue
Block a user