Merge branch 'krille/collapse-room-create-states' into 'main'

feat: Collapse room create states

See merge request ChristianPauly/fluffychat-flutter!294
This commit is contained in:
Christian Pauly
2020-11-22 18:54:31 +00:00
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(