Add commands for viewing and clearing unreads (#332)
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user