make names in typing indicators clickable
This commit is contained in:
parent
e38307657d
commit
1715ee785e
1 changed files with 23 additions and 14 deletions
|
|
@ -4,6 +4,7 @@ import "package:material_ui/material_ui.dart";
|
||||||
import "package:nexus/controllers/room_typing.dart";
|
import "package:nexus/controllers/room_typing.dart";
|
||||||
import "package:nexus/controllers/user.dart";
|
import "package:nexus/controllers/user.dart";
|
||||||
import "package:nexus/helpers/extensions/get_localpart.dart";
|
import "package:nexus/helpers/extensions/get_localpart.dart";
|
||||||
|
import "package:nexus/helpers/extensions/show_user_popover.dart";
|
||||||
import "package:nexus/widgets/bouncing_dots.dart";
|
import "package:nexus/widgets/bouncing_dots.dart";
|
||||||
|
|
||||||
class const TypingIndicator(final String roomId, {super.key})
|
class const TypingIndicator(final String roomId, {super.key})
|
||||||
|
|
@ -19,20 +20,28 @@ class const TypingIndicator(final String roomId, {super.key})
|
||||||
...typing
|
...typing
|
||||||
.take(named)
|
.take(named)
|
||||||
.map(
|
.map(
|
||||||
(typingUserId) => TextSpan(
|
(typingUserId) => WidgetSpan(
|
||||||
text:
|
alignment: .baseline,
|
||||||
ref
|
baseline: .alphabetic,
|
||||||
.watch(
|
child: Builder(
|
||||||
UserController.provider(
|
builder: (context) => InkWell(
|
||||||
.new(roomId: roomId, userId: typingUserId),
|
onTap: () =>
|
||||||
),
|
context.showUserPopover(typingUserId, roomId: roomId),
|
||||||
)
|
child: Text(
|
||||||
.value
|
ref
|
||||||
?.displayName ??
|
.watch(
|
||||||
typingUserId.localpart,
|
UserController.provider(
|
||||||
style: TextStyle(
|
.new(roomId: roomId, userId: typingUserId),
|
||||||
fontWeight: .bold,
|
),
|
||||||
color: theme.colorScheme.onSurface,
|
)
|
||||||
|
.value
|
||||||
|
?.displayName ??
|
||||||
|
typingUserId.localpart,
|
||||||
|
style: theme.textTheme.bodyMedium?.copyWith(
|
||||||
|
fontWeight: .bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue