Skip to content

Conversation

@d4rken
Copy link
Member

@d4rken d4rken commented Sep 21, 2025

When a user reinstalls the app, use their Google Play purchase date (or GitHub Sponsors date for FOSS) as the actual install date if it's earlier than the system-reported install date. This ensures long-time Pro users who reinstall maintain their true "first use" date for anniversary features.

The logic now:

  • Fetches upgrade/purchase date from UpgradeRepo with a 5-second timeout
  • Compares purchase date with saved install date
  • Uses the earlier date to preserve the user's actual first installation

Example: User purchased in 2023, reinstalled in 2025 - will use 2023 as install date.

18:52:31.280 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): savedInstalledAt: 2025-09-08T14:49:48.161Z
18:52:31.280 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): systemInstalledAt: 2025-09-08T14:49:48.161Z
18:52:31.688 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): upgradedAt: 2023-03-28T17:14:16.958Z
18:52:31.688 SDMSE:Debug:CurriculumVitae               I  updateInstalledAt(): This is a re-install, setting install date to upgrade date.

See convo in #1948

…data

  When a user reinstalls the app, use their Google Play purchase date (or GitHub Sponsors date for FOSS)
  as the actual install date if it's earlier than the system-reported install date. This ensures
  long-time Pro users who reinstall maintain their true "first use" date for anniversary features.

  The logic now:
  - Fetches upgrade/purchase date from UpgradeRepo with a 5-second timeout
  - Compares purchase date with saved install date
  - Uses the earlier date to preserve the user's actual first installation

  Example: User purchased in 2023, reinstalled in 2025 - will use 2023 as install date.

```kotlin
18:52:31.280 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): savedInstalledAt: 2025-09-08T14:49:48.161Z
18:52:31.280 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): systemInstalledAt: 2025-09-08T14:49:48.161Z
18:52:31.688 SDMSE:Debug:CurriculumVitae               V  updateInstalledAt(): upgradedAt: 2023-03-28T17:14:16.958Z
18:52:31.688 SDMSE:Debug:CurriculumVitae               I  updateInstalledAt(): This is a re-install, setting install date to upgrade date.
```

See convo in #1948
@d4rken d4rken added enhancement New feature, request, improvement or optimization General UI/UX User Interface/Experience labels Sep 21, 2025
@d4rken d4rken merged commit ff2012a into main Sep 21, 2025
13 checks passed
@d4rken d4rken deleted the restore-installdate branch September 21, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, request, improvement or optimization General UI/UX User Interface/Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants