Add autostart manager with XDG autostart support

This commit is contained in:
2026-02-27 23:45:58 +02:00
parent fcd57a372d
commit bee43b29c1
3 changed files with 98 additions and 0 deletions

View File

@@ -1739,6 +1739,16 @@ impl Database {
Ok(self.conn.last_insert_rowid())
}
// --- Autostart ---
pub fn set_autostart(&self, id: i64, enabled: bool) -> SqlResult<()> {
self.conn.execute(
"UPDATE appimages SET autostart = ?2 WHERE id = ?1",
params![id, enabled as i32],
)?;
Ok(())
}
// --- Launch statistics ---
pub fn get_top_launched(&self, limit: i32) -> SqlResult<Vec<(String, u64)>> {