ui: a New line above the first unread message, and read markers kept on disk
Messages count as read only while their chat is on screen (Nav.chat-shown) in the focused window: winit's focus events, through slint's unstable-winit-030 on the desktop; Android counts a chat on screen as read. A tab keeps the newest message read and counts what came after it, not our own. Entering a tab with new messages puts a red New line above the first one until the tab is left (so does a stored or gateway page that brings them while the tab is on screen), and while that line is above the view a bar over the list counts them, with Jump and Mark as read. voelin-store migration 5 adds chat_reads (Store::chat_read, set_chat_read, chat_reads). Markers are loaded once a session's server is known and written when a tab is left, marked read, its session ends and on exit, never per message; a restart counts what came while away again, gateway pages included. Dev switch VOELIN_OPEN=unread[:end]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
2f3c2433b4
commit
4940966538
20 files changed
+877
-128
No files matched your search
@@ -25,6 +25,12 @@ pub(super) fn wire(ui: &MainWindow) {
|
||||
bridge.on_load_older(|| {
|
||||
with_app(App::load_older);
|
||||
});
|
||||
bridge.on_mark_read(|| {
|
||||
with_app(App::mark_read);
|
||||
});
|
||||
bridge.on_chat_shown_changed(|| {
|
||||
with_app(App::chat_shown_changed);
|
||||
});
|
||||
bridge.on_react(|key, emoji| {
|
||||
with_app(|app| app.react(key, emoji.to_string()));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user