Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app update: fix ootb app update event #10

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

Augustyniak
Copy link
Contributor

Fix out-of-the-box "App Update" event for apps that haven't emitted any App Update event yet. In their case we ended up calling has_changed on every app open and each time the return value from the method was false which prevented the emission of the app update event.

After the changes from this PR, we bootstrap the app version change detection logic while calling has_changed by storing current app version in the store so that it's available for the comparison on next app open.

@Augustyniak Augustyniak requested a review from snowp August 27, 2024 19:52
let Some(previous_app_version) = self.store.get(&APP_VERSION_KEY) else {
// Initialize app version change detection logic by setting the current app version,
// making it available for comparison after a user updates their app.
self.store.set(&APP_VERSION_KEY, app_version);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the clue of the change

@Augustyniak Augustyniak merged commit c6c58a9 into main Aug 27, 2024
5 checks passed
@Augustyniak Augustyniak deleted the fix-app-update-event-flow branch August 27, 2024 20:55
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants