mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: reply2reply header
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -116,9 +116,9 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _key,
|
key: _key,
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: PreferredSize(
|
body: Column(
|
||||||
preferredSize: Size.fromHeight(widget.source == 'videoDetail' ? 45 : 1),
|
children: [
|
||||||
child: widget.source == 'videoDetail'
|
widget.source == 'videoDetail'
|
||||||
? Container(
|
? Container(
|
||||||
height: 45,
|
height: 45,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -146,8 +146,9 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
|||||||
height: 1,
|
height: 1,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
),
|
Expanded(
|
||||||
body: refreshIndicator(
|
child: ClipRect(
|
||||||
|
child: refreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _videoReplyReplyController.onRefresh();
|
await _videoReplyReplyController.onRefresh();
|
||||||
},
|
},
|
||||||
@@ -156,14 +157,16 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
|||||||
children: [
|
children: [
|
||||||
ScrollablePositionedList.builder(
|
ScrollablePositionedList.builder(
|
||||||
itemPositionsListener: itemPositionsListener,
|
itemPositionsListener: itemPositionsListener,
|
||||||
itemCount:
|
itemCount: _itemCount(
|
||||||
_itemCount(_videoReplyReplyController.loadingState.value),
|
_videoReplyReplyController.loadingState.value),
|
||||||
itemScrollController: _videoReplyReplyController.itemScrollCtr,
|
itemScrollController:
|
||||||
|
_videoReplyReplyController.itemScrollCtr,
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (widget.isDialogue) {
|
if (widget.isDialogue) {
|
||||||
return _buildBody(
|
return _buildBody(
|
||||||
_videoReplyReplyController.loadingState.value, index);
|
_videoReplyReplyController.loadingState.value,
|
||||||
|
index);
|
||||||
} else if (firstFloor != null) {
|
} else if (firstFloor != null) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return GlobalData().grpcReply
|
return GlobalData().grpcReply
|
||||||
@@ -198,7 +201,9 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
|||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
return Divider(
|
return Divider(
|
||||||
height: 20,
|
height: 20,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context)
|
||||||
|
.dividerColor
|
||||||
|
.withOpacity(0.1),
|
||||||
thickness: 6,
|
thickness: 6,
|
||||||
);
|
);
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
@@ -220,12 +225,17 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (!widget.isDialogue &&
|
if (!widget.isDialogue &&
|
||||||
_videoReplyReplyController.loadingState.value is Success)
|
_videoReplyReplyController.loadingState.value
|
||||||
|
is Success)
|
||||||
_header,
|
_header,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user