events::apply(state, host, event) changes the AppState for an engine Event and returns an Update: the parts to draw again (Refresh, each once), the status line, the engine commands, what to keep (Persist), pictures to decode again, the password dialog, notices for the bell, the chats that changed, a stream to watch. Host is what a transition asks while it runs (is the chat on screen, the store's read markers, the preview limit); the Slint client answers it in host.rs and carries the update out there, so App::handle_event is social_event, apply_event and social_refresh. The chat transitions (tabs, messages, what is read, pins and topics, files), the pictures linked in chats, the server's name, icon and gateway, joining again and the password prompt, the last place of voice and the stored volumes moved with it; Spot, the notice types, own_uids and peer_name moved to the view model crate. Update::rest hands back the events whose state is not in the AppState yet (the streams we share and watch, the studio's stream, a setting that changed); the friends, pokes and offline messages are still looked at by social.rs before and after. The vm tests replay tapes of events against a fake Host. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
34 lines
599 B
Rust
34 lines
599 B
Rust
//! Slint user interface shared by the desktop binary and the mobile apps.
|
|
|
|
mod app;
|
|
mod appearance;
|
|
mod bind;
|
|
mod camera;
|
|
mod chat;
|
|
mod dev;
|
|
mod events;
|
|
mod home;
|
|
mod host;
|
|
mod hotkey;
|
|
mod identities;
|
|
mod images;
|
|
mod inbox;
|
|
mod links;
|
|
mod members;
|
|
mod messages;
|
|
mod popout;
|
|
mod previews;
|
|
mod servers;
|
|
mod settings_page;
|
|
mod settings_pages;
|
|
mod social;
|
|
mod streams;
|
|
mod studio;
|
|
mod video;
|
|
|
|
// The view models live in their own crate; the modules keep their old paths.
|
|
use voelin_ui_vm::{self as vm, emoji, settings};
|
|
|
|
pub use app::{HostedEngine, RunOptions, run};
|
|
pub use inbox::{Request, request};
|