refactor: Not nullable room in ChatPage

This commit is contained in:
Krille 2023-03-25 15:06:12 +01:00
commit e690f1e14c
10 changed files with 102 additions and 95 deletions

View file

@ -11,7 +11,7 @@ class TombstoneDisplay extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (controller.room!.getState(EventTypes.RoomTombstone) == null) {
if (controller.room.getState(EventTypes.RoomTombstone) == null) {
return const SizedBox.shrink();
}
return SizedBox(
@ -26,7 +26,7 @@ class TombstoneDisplay extends StatelessWidget {
child: const Icon(Icons.upgrade_outlined),
),
title: Text(
controller.room!
controller.room
.getState(EventTypes.RoomTombstone)!
.parsedTombstoneContent
.body,