mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 06:55:12 +00:00
fix: Open room from notification click produces errors
This commit is contained in:
parent
ecabac9064
commit
fdaeccbf70
2 changed files with 3 additions and 2 deletions
|
@ -148,6 +148,7 @@ class ChatController extends State<Chat> {
|
|||
return;
|
||||
}
|
||||
setReadMarker();
|
||||
if (!scrollController.hasClients) return;
|
||||
if (scrollController.position.pixels ==
|
||||
scrollController.position.maxScrollExtent &&
|
||||
timeline!.events.isNotEmpty &&
|
||||
|
|
|
@ -289,13 +289,13 @@ class BackgroundPush {
|
|||
Future<void> goToRoom(String? roomId) async {
|
||||
try {
|
||||
Logs().v('[Push] Attempting to go to room $roomId...');
|
||||
if (router == null) {
|
||||
if (router == null || roomId == null) {
|
||||
return;
|
||||
}
|
||||
await client.roomsLoading;
|
||||
await client.accountDataLoading;
|
||||
final isStory = client
|
||||
.getRoomById(roomId!)
|
||||
.getRoomById(roomId)
|
||||
?.getState(EventTypes.RoomCreate)
|
||||
?.content
|
||||
.tryGet<String>('type') ==
|
||||
|
|
Loading…
Reference in a new issue