From b8c8bc4aae0efcb0f260e377496fb78c217dadeb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 01:22:47 +0000 Subject: [PATCH] voelin-ui: keep avatars and icons next to the database on Android The engine caches avatars and icons in the platform's cache directory, which Android does not have (it would resolve to a relative path). A host that names the data directory gets the cache in /images. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G --- crates/voelin-ui/src/app.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/voelin-ui/src/app.rs b/crates/voelin-ui/src/app.rs index 18eff60..578b06d 100644 --- a/crates/voelin-ui/src/app.rs +++ b/crates/voelin-ui/src/app.rs @@ -358,6 +358,11 @@ pub fn run(options: RunOptions) -> Result<()> { // VOELIN_DATA_DIR isolates the database; the other development // switches are in dev.rs. + // A host that names the data directory (Android) has no platform cache + // directory either: avatars and icons go next to the database. + if let Some(dir) = &options.data_dir { + engine.send(Command::AttachCache(dir.join("images"))); + } let dir: PathBuf = match (options.data_dir, std::env::var_os("VOELIN_DATA_DIR")) { (Some(dir), _) => dir, (None, Some(dir)) => dir.into(),