Skip to content

Commit

Permalink
retrieve the legacy build number as an integer instead of a string. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
didiergarcia authored Apr 21, 2023
1 parent d7e6d4b commit 35170e0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ class AndroidStorage(
Storage.Constants.Events -> {
eventsFile.read().joinToString()
}
Storage.Constants.LegacyAppBuild -> {
// The legacy app build number was stored as an integer so we have to get it
// as an integer and convert it to a String.
val noBuild = -1
val build = sharedPreferences.getInt(key.rawVal, noBuild)
if (build != noBuild) {
return build.toString()
} else {
return null
}
}
else -> {
sharedPreferences.getString(key.rawVal, null)
}
Expand Down

0 comments on commit 35170e0

Please sign in to comment.