add create event, fix generic event icon
This commit is contained in:
parent
2ba620350d
commit
ec64a81fed
2 changed files with 8 additions and 8 deletions
|
|
@ -39,13 +39,6 @@ class EventRenderer extends ConsumerWidget {
|
||||||
final colorScheme = theme.colorScheme;
|
final colorScheme = theme.colorScheme;
|
||||||
final errorStyle = TextStyle(color: colorScheme.error);
|
final errorStyle = TextStyle(color: colorScheme.error);
|
||||||
|
|
||||||
final contextMenuCallback = getEventOptions == null
|
|
||||||
? null
|
|
||||||
: (details) => context.showContextMenu(
|
|
||||||
globalPosition: details.globalPosition,
|
|
||||||
children: getEventOptions!(event).toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
final child = event.redactedBy != null || event.relationType == "m.replace"
|
final child = event.redactedBy != null || event.relationType == "m.replace"
|
||||||
? null
|
? null
|
||||||
: switch (event.content) {
|
: switch (event.content) {
|
||||||
|
|
@ -105,6 +98,13 @@ class EventRenderer extends ConsumerWidget {
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
final contextMenuCallback = getEventOptions == null
|
||||||
|
? null
|
||||||
|
: (details) => context.showContextMenu(
|
||||||
|
globalPosition: details.globalPosition,
|
||||||
|
children: getEventOptions!(event).toList(),
|
||||||
|
);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class GenericEventRenderer extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 4),
|
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
child: Icon(Icons.people),
|
child: Icon(icon),
|
||||||
),
|
),
|
||||||
Expanded(child: Wrap(spacing: 4, children: children)),
|
Expanded(child: Wrap(spacing: 4, children: children)),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue