Add autostart manager with XDG autostart support
This commit is contained in:
@@ -1744,6 +1744,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)>> {
|
||||
|
||||
Reference in New Issue
Block a user