Skip to content

Notify updates for disabled installed apps - #173

Merged
anod merged 2 commits into
masterfrom
anod-notify-disabled-app-updates
Oct 4, 2026
Merged

anod merged 2 commits into
masterfrom
anod-notify-disabled-app-updates

Conversation

@anod

@anod anod commented Oct 4, 2026

Copy link
Copy Markdown
Owner

After #167, updates for disabled/sleeping installed apps were silently consumed during sync, so users never got notified about new releases of apps their system put to sleep (#171). This keeps detecting and notifying those updates while the UI continues to show the app as "Installed but disabled" rather than updatable.

Approach

  • Sync: disabled apps go through the normal decision path again. A new release persists STATUS_UPDATED and advances the cached versionNumber, so it is notified once and later syncs don't repeat it. The CLEAR_DISABLED_UPDATE / DISABLED_INSTALLED decisions are removed.
  • UI unchanged in meaning: the Updatable filter, New/Recent sections, section ranking and details presentation already gate on isPackageEnabled, so disabled apps still show the disabled label and are not listed as updatable. Re-enabling the app reveals the existing update without a new notification.
  • Notification payload: UpdatedApp gets an explicit installedEnabled (no default) and canUpdateOnDevice. The "Update" action is only offered when the app is installed and enabled.
  • Removed clearing: disabled-status clearing on startup, at sync start and on package broadcasts is gone, along with the now-unused DAO queries.

Notes

  • Releases already silently consumed under 1.7.2 are not retro-notified; the next sync restores their status silently.
  • Release baseline profile files still reference removed methods; they are regenerated at release.

Tests

Updated/added cases in UpdateCheckVersionRollbackTest, SyncNotificationFilterTest, WatchListPagingSourceRoomTest and AppItemStateTest. Full :app:testDebugUnitTest and ktlintCheck pass.

Fixes #171

Keep STATUS_UPDATED for sleeping/disabled apps so new releases are
notified once, while UI keeps showing disabled status via existing
isPackageEnabled gating. Gate notification Update action on enabled
installs and remove disabled-status clearing on startup, sync, and
package broadcasts.

Fixes #171

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Disabled-only multi-app notifications lose their expanded list and Dismiss action.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Preserves update notifications for disabled installed apps while keeping them excluded from actionable update UI.

Changes:

  • Removes disabled-app update-status clearing.
  • Propagates package-enabled state into notification actions.
  • Updates sync, paging, notification, and presentation tests.
File Description
AppListTable.kt Removes obsolete status-clearing queries.
PackageRemovedReceiver.kt Stops clearing updates on package broadcasts.
SettingsViewModel.kt Supplies enabled state to test notifications.
SyncNotification.kt Gates device-update actions by enabled state.
UpdateCheck.kt Restores normal update decisions for disabled apps.
UpdatedApp.kt Adds enabled state and update capability.
PackageEnabledState.kt Removes disabled-status clearing helpers.
WatchListStateViewModel.kt Removes startup status clearing.
AppItemStateTest.kt Verifies disabled-app styling.
UpdateCheckVersionRollbackTest.kt Covers restored sync decisions.
SyncNotificationFilterTest.kt Covers disabled-app notification filtering.
WatchListPagingSourceRoomTest.kt Covers disabled and re-enabled UI behavior.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/src/main/java/com/anod/appwatcher/sync/SyncNotification.kt Outdated
Only gate the Update action on canUpdateOnDevice so notifications for
disabled apps still list app titles and offer Dismiss. Cover repeat
notification prevention for marked sleeping app updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The sync, notification, and UI behavior is internally consistent and covered by focused tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@anod
anod merged commit bc618f0 into master Oct 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

can only see active apps

3 participants