mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -1,3 +1,5 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/skeleton/msg_feed_top.dart';
|
||||
import 'package:PiliPlus/common/widgets/button/more_btn.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/refresh_indicator.dart';
|
||||
@@ -46,37 +48,29 @@ class _FollowChildPageState extends State<FollowChildPage>
|
||||
super.build(context);
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
final padding = MediaQuery.viewPaddingOf(context);
|
||||
Widget sliver = Obx(
|
||||
() => _buildBody(_followController.loadingState.value),
|
||||
);
|
||||
if (_followController.loadSameFollow) {
|
||||
sliver = SliverMainAxisGroup(
|
||||
slivers: [
|
||||
Obx(
|
||||
() => _buildSameFollowing(
|
||||
colorScheme,
|
||||
_followController.sameState.value,
|
||||
Widget child = Padding(
|
||||
padding: EdgeInsets.only(left: padding.left, right: padding.right),
|
||||
child: refreshIndicator(
|
||||
onRefresh: _followController.onRefresh,
|
||||
child: CustomScrollView(
|
||||
controller: _followController.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (_followController.loadSameFollow)
|
||||
Obx(
|
||||
() => _buildSameFollowing(
|
||||
colorScheme,
|
||||
_followController.sameState.value,
|
||||
),
|
||||
),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(bottom: padding.bottom + 100),
|
||||
sliver: Obx(
|
||||
() => _buildBody(_followController.loadingState.value),
|
||||
),
|
||||
),
|
||||
),
|
||||
sliver,
|
||||
],
|
||||
);
|
||||
}
|
||||
Widget child = refreshIndicator(
|
||||
onRefresh: _followController.onRefresh,
|
||||
child: CustomScrollView(
|
||||
controller: _followController.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
left: padding.left,
|
||||
right: padding.right,
|
||||
bottom: padding.bottom + 100,
|
||||
),
|
||||
sliver: sliver,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
if (widget.onSelect != null ||
|
||||
@@ -176,7 +170,7 @@ class _FollowChildPageState extends State<FollowChildPage>
|
||||
),
|
||||
),
|
||||
SliverList.builder(
|
||||
itemCount: response!.length,
|
||||
itemCount: min(3, response!.length),
|
||||
itemBuilder: (_, index) =>
|
||||
FollowItem(item: response[index]),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user