mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 11:09:25 +01:00
fix: Only mark unread if actually marked
This commit is contained in:
parent
7579de7323
commit
99d9149ef9
@ -169,13 +169,7 @@ class ChatController extends State<Chat> {
|
|||||||
timeline = await room.getTimeline(onUpdate: updateView);
|
timeline = await room.getTimeline(onUpdate: updateView);
|
||||||
if (timeline.events.isNotEmpty) {
|
if (timeline.events.isNotEmpty) {
|
||||||
// ignore: unawaited_futures
|
// ignore: unawaited_futures
|
||||||
room.markUnread(false).catchError((err) {
|
if (room.markedUnread) room.markUnread(false);
|
||||||
if (err is MatrixException && err.errcode == 'M_FORBIDDEN') {
|
|
||||||
// ignore if the user is not in the room (still joining)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw err;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// when the scroll controller is attached we want to scroll to an event id, if specified
|
// when the scroll controller is attached we want to scroll to an event id, if specified
|
||||||
|
Loading…
Reference in New Issue
Block a user