fix(ui): use isUpToDateStream
This commit is contained in:
@@ -647,15 +647,19 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<bool>(
|
BetterStreamBuilder<bool>(
|
||||||
valueListenable: _showScrollToBottom,
|
stream: streamChannel!.channel.state!.isUpToDateStream,
|
||||||
child: _buildScrollToBottom(),
|
initialData: streamChannel!.channel.state!.isUpToDate,
|
||||||
builder: (context, value, child) {
|
builder: (context, snapshot) => ValueListenableBuilder<bool>(
|
||||||
if (!streamChannel!.channel.state!.isUpToDate || value) {
|
valueListenable: _showScrollToBottom,
|
||||||
return child!;
|
child: _buildScrollToBottom(),
|
||||||
}
|
builder: (context, value, child) {
|
||||||
return const Offstage();
|
if (!snapshot || value) {
|
||||||
},
|
return child!;
|
||||||
|
}
|
||||||
|
return const Offstage();
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (widget.showFloatingDateDivider)
|
if (widget.showFloatingDateDivider)
|
||||||
_buildFloatingDateDivider(itemCount),
|
_buildFloatingDateDivider(itemCount),
|
||||||
|
|||||||
Reference in New Issue
Block a user