mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
api(rust and jsonrpc): marknoticed_all_chats method to mark all chats as notices, including muted ones. (#7709)
made for solving
https://github.com/deltachat/deltachat-desktop/issues/5891#issuecomment-3687566470
will also be more efficient, because desktop currently loads all fresh
messages to find out which chats to mark as noticed.
76d32bfc93/packages/frontend/src/components/AccountListSidebar/AccountItem.tsx (L334)
# progress
- [x] implementation
- [x] write a test
- [x] make a pr to use it in desktop
https://github.com/deltachat/deltachat-desktop/pull/5923
- [x] address review comments
---------
Co-authored-by: WofWca <wofwca@protonmail.com>
This commit is contained in:
@@ -1492,6 +1492,15 @@ impl EventTracker {
|
||||
pub fn clear_events(&self) {
|
||||
while let Ok(_ev) = self.try_recv() {}
|
||||
}
|
||||
|
||||
/// Takes all items from event queue and returns them.
|
||||
pub fn take_events(&self) -> Vec<Event> {
|
||||
let mut events = Vec::new();
|
||||
while let Ok(event) = self.try_recv() {
|
||||
events.push(event);
|
||||
}
|
||||
events
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets a specific message from a chat and asserts that the chat has a specific length.
|
||||
|
||||
Reference in New Issue
Block a user