Skip to content

Commit

Permalink
feat(neon_talk): Show user status on room page
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Mar 16, 2024
1 parent e06cfe3 commit 7f1f320
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/neon/neon_talk/lib/src/pages/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ class _TalkRoomPageState extends State<TalkRoomPage> {
TalkRoomAvatar(
room: widget.room,
),
Text(result.requireData.displayName),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(result.requireData.displayName),
buildUserStatus(result.requireData),
],
),
NeonError(
result.error,
onRetry: bloc.refresh,
Expand Down Expand Up @@ -123,4 +129,16 @@ class _TalkRoomPageState extends State<TalkRoomPage> {
},
);
}

Widget buildUserStatus(spreed.Room room) {
final statusMessage = room.statusMessage;
if (statusMessage != null) {
return Text(
statusMessage,
style: Theme.of(context).textTheme.labelSmall,
);
}

return const SizedBox();
}
}

0 comments on commit 7f1f320

Please sign in to comment.