mirror of
https://github.com/youwen5/iamb.git
synced 2025-08-04 11:38:28 -07:00
Add commands for viewing and clearing unreads (#332)
This commit is contained in:
parent
4fc05c7b40
commit
480888a1fc
5 changed files with 135 additions and 0 deletions
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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue