Add system modification tracking for reversible installs

This commit is contained in:
lashman
2026-02-27 23:35:27 +02:00
parent 6e2e7e8e36
commit 8dd0dc71ed
9 changed files with 207 additions and 10 deletions

View File

@@ -742,11 +742,12 @@ impl DriftwoodWindow {
let toast_overlay = window.imp().toast_overlay.get().unwrap().clone();
if let Ok(Some(record)) = db.get_appimage_by_id(record_id) {
if record.integrated {
integrator::undo_all_modifications(&db, record_id).ok();
integrator::remove_integration(&record).ok();
db.set_integrated(record_id, false, None).ok();
toast_overlay.add_toast(adw::Toast::new("Integration removed"));
} else {
match integrator::integrate(&record) {
match integrator::integrate_tracked(&record, &db) {
Ok(result) => {
let desktop_path = result.desktop_file_path.to_string_lossy().to_string();
db.set_integrated(record_id, true, Some(&desktop_path)).ok();