fix: installer progress bar

This commit is contained in:
Alberto Ponces 2022-09-05 13:48:56 +01:00
parent 2944a2b788
commit ecc2e5b688
2 changed files with 7 additions and 5 deletions

View File

@ -156,7 +156,7 @@ class MainActivity : FlutterActivity() {
"update", "update",
mapOf( mapOf(
"progress" to "progress" to
0.2, -1.0,
"header" to "header" to
"", "",
"log" to "log" to
@ -173,7 +173,7 @@ class MainActivity : FlutterActivity() {
"update", "update",
mapOf( mapOf(
"progress" to "progress" to
0.2, -1.0,
"header" to "header" to
"", "",
"log" to "log" to
@ -190,7 +190,7 @@ class MainActivity : FlutterActivity() {
"update", "update",
mapOf( mapOf(
"progress" to "progress" to
0.2, -1.0,
"header" to "header" to
"", "",
"log" to "log" to
@ -207,7 +207,7 @@ class MainActivity : FlutterActivity() {
"update", "update",
mapOf( mapOf(
"progress" to "progress" to
0.2, -1.0,
"header" to "header" to
"", "",
"log" to "log" to

View File

@ -69,7 +69,9 @@ class InstallerViewModel extends BaseViewModel {
} }
void update(double value, String header, String log) { void update(double value, String header, String log) {
progress = value; if (value > 0) {
progress = value;
}
isPatching = progress == 1.0 ? false : true; isPatching = progress == 1.0 ? false : true;
if (progress == 0.0) { if (progress == 0.0) {
logs = ''; logs = '';