always make event previews two lines for non-state events
This commit is contained in:
parent
e480e6193b
commit
ffaa516dcd
2 changed files with 27 additions and 36 deletions
|
|
@ -199,30 +199,25 @@ class const MessageRenderer(
|
|||
child: Padding(
|
||||
padding: .symmetric(vertical: 8, horizontal: 12),
|
||||
child: SizedBox(
|
||||
height: 32,
|
||||
child: OverflowBox(
|
||||
alignment: .centerLeft,
|
||||
minHeight: 0,
|
||||
maxHeight: .infinity,
|
||||
child: switch (ref.watch(
|
||||
EventController.provider(
|
||||
.new(
|
||||
roomId: event.roomId,
|
||||
eventId: event.replyTo!,
|
||||
),
|
||||
height: 48,
|
||||
child: switch (ref.watch(
|
||||
EventController.provider(
|
||||
.new(
|
||||
roomId: event.roomId,
|
||||
eventId: event.replyTo!,
|
||||
),
|
||||
)) {
|
||||
AsyncData(:final value?) ||
|
||||
AsyncLoading(
|
||||
:final value?,
|
||||
) => EventPreview(value),
|
||||
AsyncError _ => Text(
|
||||
"An error occurred while fetching the reply",
|
||||
style: errorStyle,
|
||||
),
|
||||
_ => Loading(dimension: 12),
|
||||
},
|
||||
),
|
||||
),
|
||||
)) {
|
||||
AsyncData(:final value?) ||
|
||||
AsyncLoading(
|
||||
:final value?,
|
||||
) => EventPreview(value),
|
||||
AsyncError _ => Text(
|
||||
"An error occurred while fetching the reply",
|
||||
style: errorStyle,
|
||||
),
|
||||
_ => Loading(dimension: 12),
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue