From c7455977f60c8e47e779a26510853fce4077dbd2 Mon Sep 17 00:00:00 2001 From: selikhov Date: Sat, 3 Oct 2026 12:29:25 +0300 Subject: [PATCH] Pictures in chat as inline cards; navigate after callbacks A linked picture whose bytes arrived shows as a picture card in the message (a click opens it larger) instead of the file card. Navigating from the app (opening a conversation, a notification, a search result) ran Nav's functions inside a callback, and Nav calls back into the app, which was borrowed: the app panicked. Such navigation now runs after the callback, as the Stream Studio's does. Co-Authored-By: Claude Opus 5.5 --- crates/voelin-ui/src/home.rs | 6 ++-- crates/voelin-ui/src/images.rs | 11 ++++++ crates/voelin-ui/src/messages.rs | 4 +-- crates/voelin-ui/src/social.rs | 29 ++++++++-------- crates/voelin-ui/ui/screens/chat.slint | 46 +++++++++++++++++++++++--- 5 files changed, 72 insertions(+), 24 deletions(-) diff --git a/crates/voelin-ui/src/home.rs b/crates/voelin-ui/src/home.rs index 457af30..66377ec 100644 --- a/crates/voelin-ui/src/home.rs +++ b/crates/voelin-ui/src/home.rs @@ -8,7 +8,7 @@ use std::path::{Path, PathBuf}; use slint::ComponentHandle; use voelin_core::VoiceState; -use crate::app::{App, Bridge, HappeningItem, LiveItem, Nav, Page, RecordingItem}; +use crate::app::{App, Bridge, HappeningItem, LiveItem, Page, RecordingItem}; use crate::vm; use crate::vm::social::{event_when, plain}; @@ -234,9 +234,7 @@ impl App { match target { Happening::Event(session, _) => { self.select_server(session); - if let Some(ui) = self.ui.upgrade() { - ui.global::