M12 — the Android client, end to end #2

Merged
bvandeusen merged 86 commits from dev into main 2026-08-21 08:53:58 -04:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 2e8717a057 - Show all commits
+4 -2
View File
@@ -683,8 +683,10 @@ pub fn record_pending_delete(conn: &Connection, entity: &str, id: &str) -> rusql
/// default rather than one being invented here — the meaning of "unset" belongs
/// with the setting, not with the storage.
pub fn pref(conn: &Connection, key: &str) -> rusqlite::Result<Option<String>> {
conn.query_row("SELECT value FROM prefs WHERE key = ?1", [key], |r| r.get(0))
.optional()
conn.query_row("SELECT value FROM prefs WHERE key = ?1", [key], |r| {
r.get(0)
})
.optional()
}
pub fn set_pref(conn: &Connection, key: &str, value: &str) -> rusqlite::Result<()> {
+4 -1
View File
@@ -92,7 +92,10 @@ fn self_update_blocker() -> Option<String> {
fn read_channel(db: &State<'_, Db>) -> Result<Channel, String> {
let conn = db.0.lock().map_err(|e| e.to_string())?;
let raw = store::pref(&conn, CHANNEL_PREF).map_err(|e| e.to_string())?;
Ok(raw.as_deref().map(Channel::parse).unwrap_or(Channel::Stable))
Ok(raw
.as_deref()
.map(Channel::parse)
.unwrap_or(Channel::Stable))
}
#[tauri::command]