mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -81,17 +81,10 @@ class _DynamicsTabPageState
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
// debugPrint(widget.dynamicsType + widget.mid.value.toString());
|
|
||||||
return refreshIndicator(
|
return refreshIndicator(
|
||||||
// key:
|
|
||||||
// ValueKey<String>(widget.dynamicsType + widget.mid.value.toString()),
|
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
dynamicsWaterfallFlow = GStorage.setting
|
dynamicsController.queryFollowUp();
|
||||||
.get(SettingBoxKey.dynamicsWaterfallFlow, defaultValue: true);
|
await controller.onRefresh();
|
||||||
await Future.wait([
|
|
||||||
controller.onRefresh(),
|
|
||||||
dynamicsController.queryFollowUp(),
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
|
|||||||
@@ -32,10 +32,11 @@ class _SearchDynamicState extends State<SearchDynamic>
|
|||||||
return Obx(() => _buildBody(context, widget.ctr.dynamicState.value));
|
return Obx(() => _buildBody(context, widget.ctr.dynamicState.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
late final bool dynamicsWaterfallFlow = GStorage.setting
|
||||||
|
.get(SettingBoxKey.dynamicsWaterfallFlow, defaultValue: true);
|
||||||
|
|
||||||
Widget _buildBody(BuildContext context,
|
Widget _buildBody(BuildContext context,
|
||||||
LoadingState<List<DynamicItemModel>?> loadingState) {
|
LoadingState<List<DynamicItemModel>?> loadingState) {
|
||||||
bool dynamicsWaterfallFlow = GStorage.setting
|
|
||||||
.get(SettingBoxKey.dynamicsWaterfallFlow, defaultValue: true);
|
|
||||||
return switch (loadingState) {
|
return switch (loadingState) {
|
||||||
Loading() => loadingWidget,
|
Loading() => loadingWidget,
|
||||||
Success() => loadingState.response?.isNotEmpty == true
|
Success() => loadingState.response?.isNotEmpty == true
|
||||||
|
|||||||
Reference in New Issue
Block a user