Sentry (#3378)
* chore: fix version parsing for debug builds * chore: don't cast doubles as ints
This commit is contained in:
parent
9b13e27a0c
commit
aa3b3a3d1e
2 changed files with 13 additions and 6 deletions
|
|
@ -74,8 +74,8 @@ class LevelUpManager {
|
|||
prevVocab = lastSummary.levelVocabConstructs!;
|
||||
prevGrammar = lastSummary.levelGrammarConstructs!;
|
||||
} else {
|
||||
prevGrammar = (nextGrammar / prevLevel) as int;
|
||||
prevVocab = (nextVocab / prevLevel) as int;
|
||||
prevGrammar = (nextGrammar / prevLevel).round();
|
||||
prevVocab = (nextVocab / prevLevel).round();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,10 +76,17 @@ class AppVersionUtil {
|
|||
|
||||
// convert the version number string into a list of ints
|
||||
// and the build number string into an int
|
||||
final currentVersionParts =
|
||||
currentVersion.split(".").map((e) => int.parse(e)).toList();
|
||||
final remoteVersionParts =
|
||||
remoteVersion.split(".").map((e) => int.parse(e)).toList();
|
||||
final currentVersionParts = currentVersion
|
||||
.replaceAll(RegExp(r'[^0-9.]'), '')
|
||||
.split(".")
|
||||
.map((e) => int.parse(e))
|
||||
.toList();
|
||||
final remoteVersionParts = remoteVersion
|
||||
.replaceAll(RegExp(r'[^0-9.]'), '')
|
||||
.split(".")
|
||||
.map((e) => int.parse(e))
|
||||
.toList();
|
||||
|
||||
final currentBuildNumberInt = int.parse(currentBuildNumber);
|
||||
final remoteBuildNumberInt = int.parse(remoteBuildNumber);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue