redesign user popover
This commit is contained in:
parent
e15d947fac
commit
d46646d781
9 changed files with 302 additions and 272 deletions
|
|
@ -12,21 +12,18 @@ class MessageAvatar extends ConsumerWidget {
|
|||
const MessageAvatar(this.event, {this.height = 24, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) =>
|
||||
switch (ref.watch(AuthorController.provider(event))) {
|
||||
AsyncData(:final value) || AsyncLoading(:final value?) => InkWell(
|
||||
onTapUp: (details) => context.showUserPopover(
|
||||
value,
|
||||
event.sender,
|
||||
roomId: event.roomId,
|
||||
globalPosition: details.globalPosition,
|
||||
),
|
||||
child: AvatarOrHash(
|
||||
value.avatarUrl,
|
||||
value.displayName ?? event.sender.localpart,
|
||||
height: height,
|
||||
),
|
||||
),
|
||||
_ => AvatarOrHash(null, event.sender.localpart, height: height),
|
||||
};
|
||||
Widget build(BuildContext context, WidgetRef ref) => switch (ref.watch(
|
||||
AuthorController.provider(event),
|
||||
)) {
|
||||
AsyncData(:final value) || AsyncLoading(:final value?) => InkWell(
|
||||
onTapUp: (details) =>
|
||||
context.showUserPopover(value, event.sender, roomId: event.roomId),
|
||||
child: AvatarOrHash(
|
||||
value.avatarUrl,
|
||||
value.displayName ?? event.sender.localpart,
|
||||
height: height,
|
||||
),
|
||||
),
|
||||
_ => AvatarOrHash(null, event.sender.localpart, height: height),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class MessageDisplayname extends ConsumerWidget {
|
|||
value,
|
||||
event.sender,
|
||||
roomId: event.roomId,
|
||||
globalPosition: details.globalPosition,
|
||||
)
|
||||
: null,
|
||||
child: Wrap(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue