Skip to content

Commit 8e8b0a0

Browse files
committed
Stage updates to persist across app restarts and manage removal of updates when no longer available
1 parent 1720166 commit 8e8b0a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/windows/main_window.vala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,8 +1247,14 @@ namespace AppManager {
12471247
var key = record_state_key(result.record);
12481248
if (result.has_update) {
12491249
pending_update_keys.add(key);
1250+
// Stage the update so it persists across app restarts
1251+
staged_updates.add(result.record.id, result.record.name, result.available_version);
1252+
staged_updates.save();
12501253
} else {
12511254
pending_update_keys.remove(key);
1255+
// Remove from staged updates if no longer has an update
1256+
staged_updates.remove(result.record.id);
1257+
staged_updates.save();
12521258
}
12531259

12541260
refresh_installations();

0 commit comments

Comments
 (0)