mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: live room
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -333,9 +333,12 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
onPointerDown: (_) {
|
||||
_node.unfocus();
|
||||
},
|
||||
child: LiveRoomChat(
|
||||
roomId: _roomId,
|
||||
liveRoomController: _liveRoomController,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: LiveRoomChat(
|
||||
roomId: _roomId,
|
||||
liveRoomController: _liveRoomController,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -28,6 +28,7 @@ class _LiveRoomChatState extends State<LiveRoomChat> {
|
||||
children: [
|
||||
Obx(
|
||||
() => ListView.separated(
|
||||
padding: const EdgeInsets.all(0),
|
||||
controller: widget.liveRoomController.scrollController,
|
||||
separatorBuilder: (_, index) => const SizedBox(height: 6),
|
||||
itemCount: widget.liveRoomController.messages.length,
|
||||
@@ -82,9 +83,12 @@ class _LiveRoomChatState extends State<LiveRoomChat> {
|
||||
() => widget.liveRoomController.disableAutoScroll.value
|
||||
? Positioned(
|
||||
right: 12,
|
||||
bottom: 12,
|
||||
bottom: 0,
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.arrow_downward_rounded),
|
||||
icon: const Icon(
|
||||
Icons.arrow_downward_rounded,
|
||||
size: 20,
|
||||
),
|
||||
label: const Text('回到底部'),
|
||||
onPressed: () {
|
||||
widget.liveRoomController.disableAutoScroll.value = false;
|
||||
|
||||
Reference in New Issue
Block a user