Add commands for viewing and clearing unreads (#332)

This commit is contained in:
Ulyssa 2024-08-20 19:33:46 -07:00 committed by GitHub
parent 4fc05c7b40
commit 480888a1fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 135 additions and 0 deletions

View file

@ -529,6 +529,18 @@ impl Application {
}
let info = match action {
IambAction::ClearUnreads => {
let user_id = &store.application.settings.profile.user_id;
for room_id in store.application.sync_info.chats() {
if let Some(room) = store.application.rooms.get_mut(room_id) {
room.fully_read(user_id.clone());
}
}
None
},
IambAction::ToggleScrollbackFocus => {
self.screen.current_window_mut()?.focus_toggle();