feat: Collapse room create states

This commit is contained in:
Christian Pauly 2020-11-22 19:34:19 +01:00
commit 321e3dd776
3 changed files with 45 additions and 16 deletions

View file

@ -37,6 +37,12 @@ class Message extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (event.type == EventTypes.RoomCreate) {
return InkWell(
onTap: () => onSelect(event),
child: StateMessage(event),
);
}
if (![EventTypes.Message, EventTypes.Sticker, EventTypes.Encrypted]
.contains(event.type)) {
return StateMessage(event);

View file

@ -18,9 +18,9 @@ class StateMessage extends StatelessWidget {
),
child: Center(
child: Container(
padding: const EdgeInsets.all(4),
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).backgroundColor.withOpacity(0.8),
color: Theme.of(context).secondaryHeaderColor.withOpacity(0.9),
borderRadius: BorderRadius.circular(7),
),
child: Text(