[Room] Set unread notifications to 0 manually

This commit is contained in:
Christian Pauly 2019-12-17 12:07:25 +01:00
parent 2821cdf232
commit bb87ecc1f2
2 changed files with 5 additions and 1 deletions

View file

@ -611,6 +611,8 @@ class Room {
/// Sends *m.fully_read* and *m.read* for the given event ID.
Future<dynamic> sendReadReceipt(String eventID) async {
this.notificationCount = 0;
client?.store?.resetNotificationCount(this.id);
final dynamic resp = client.connection.jsonRequest(
type: HTTPType.POST,
action: "/client/r0/rooms/$id/read_markers",

View file

@ -92,6 +92,8 @@ abstract class StoreAPI {
Future<void> forgetRoom(String roomID);
Future<void> resetNotificationCount(String roomID);
/// Searches for the event in the store.
Future<Event> getEventById(String eventID, Room room);