nicer / less intrusive mention style
This commit is contained in:
parent
7f7fb451e6
commit
f23a35384d
1 changed files with 15 additions and 20 deletions
|
|
@ -40,26 +40,21 @@ class const MentionChip(final String content, final String? roomId, {super.key})
|
||||||
// TODO: Handle summary
|
// TODO: Handle summary
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: IgnorePointer(
|
child: Text(
|
||||||
child: Chip(
|
switch (data) {
|
||||||
label: Text(
|
RoomSummary summary =>
|
||||||
switch (data) {
|
(summary.name == null ? null : "#${summary.name}") ??
|
||||||
RoomSummary summary =>
|
summary.canonicalAlias ??
|
||||||
(summary.name == null ? null : "#${summary.name}") ??
|
summary.roomId,
|
||||||
summary.canonicalAlias ??
|
MembershipContent membership =>
|
||||||
summary.roomId,
|
membership.displayName == null
|
||||||
MembershipContent membership =>
|
? mention
|
||||||
membership.displayName == null
|
: "@${membership.displayName}",
|
||||||
? mention
|
_ => mention,
|
||||||
: "@${membership.displayName}",
|
},
|
||||||
_ => mention,
|
style: .new(
|
||||||
},
|
fontWeight: .bold,
|
||||||
style: .new(
|
color: Theme.of(context).colorScheme.primary,
|
||||||
fontWeight: .bold,
|
|
||||||
color: Theme.of(context).colorScheme.onPrimary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue