Skip to content

Commit

Permalink
Change name of proto key
Browse files Browse the repository at this point in the history
  • Loading branch information
kl committed Jan 8, 2025
1 parent 42a0760 commit b5197c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ChangelogRepository(
userPreferencesRepository.preferencesFlow
.map {
getLastVersionChanges().isNotEmpty() &&
buildVersion.code > it.versionCodeForLatestShownChangelogNotification
buildVersion.code > it.lastShownChangelogVersionCode
}
.stateIn(
CoroutineScope(dispatcher),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ class UserPreferencesRepository(

suspend fun setHasDisplayedChangelogNotification() {
userPreferencesStore.updateData { prefs ->
prefs
.toBuilder()
.setVersionCodeForLatestShownChangelogNotification(buildVersion.code)
.build()
prefs.toBuilder().setLastShownChangelogVersionCode(buildVersion.code).build()
}
}
}
2 changes: 1 addition & 1 deletion android/app/src/main/proto/user_prefs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ option java_multiple_files = true;

message UserPreferences {
bool is_privacy_disclosure_accepted = 1;
int32 version_code_for_latest_shown_changelog_notification = 2;
int32 last_shown_changelog_version_code = 2;
}

0 comments on commit b5197c6

Please sign in to comment.