mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
fix: Missing null check
This commit is contained in:
parent
4eb919b805
commit
7cb0dc4d2b
@ -576,11 +576,11 @@ class BackgroundPush {
|
|||||||
Future<void> _showNotification(String roomId, String eventId) async {
|
Future<void> _showNotification(String roomId, String eventId) async {
|
||||||
await setupLocalNotificationsPlugin();
|
await setupLocalNotificationsPlugin();
|
||||||
final room = client.getRoomById(roomId);
|
final room = client.getRoomById(roomId);
|
||||||
await room.postLoad();
|
|
||||||
final event = await client.database.getEventById(client.id, eventId, room);
|
|
||||||
if (room == null) {
|
if (room == null) {
|
||||||
throw 'Room not found';
|
throw 'Room not found';
|
||||||
}
|
}
|
||||||
|
await room.postLoad();
|
||||||
|
final event = await client.database.getEventById(client.id, eventId, room);
|
||||||
|
|
||||||
if (((client.activeRoomId?.isNotEmpty ?? false) &&
|
if (((client.activeRoomId?.isNotEmpty ?? false) &&
|
||||||
client.activeRoomId == room.id &&
|
client.activeRoomId == room.id &&
|
||||||
|
Loading…
Reference in New Issue
Block a user