fetcher: always finish the progress reporting animation smoothly to 100%
This commit is contained in:
parent
cbec38337c
commit
910a05ae0b
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace SparkleLib {
|
||||||
|
|
||||||
|
@ -136,6 +137,18 @@ namespace SparkleLib {
|
||||||
this.git.WaitForExit ();
|
this.git.WaitForExit ();
|
||||||
SparkleHelpers.DebugInfo ("Git", "Exit code " + this.git.ExitCode.ToString ());
|
SparkleHelpers.DebugInfo ("Git", "Exit code " + this.git.ExitCode.ToString ());
|
||||||
|
|
||||||
|
while (percentage < 100) {
|
||||||
|
percentage += 25;
|
||||||
|
|
||||||
|
if (percentage >= 100)
|
||||||
|
break;
|
||||||
|
|
||||||
|
base.OnProgressChanged (percentage);
|
||||||
|
Thread.Sleep (750);
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnProgressChanged (100);
|
||||||
|
Thread.Sleep (1000);
|
||||||
|
|
||||||
if (this.git.ExitCode != 0) {
|
if (this.git.ExitCode != 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -331,7 +331,6 @@ namespace SparkleShare {
|
||||||
if (ChangePageEvent != null)
|
if (ChangePageEvent != null)
|
||||||
ChangePageEvent (PageType.Finished, warnings);
|
ChangePageEvent (PageType.Finished, warnings);
|
||||||
|
|
||||||
|
|
||||||
PreviousAddress = "";
|
PreviousAddress = "";
|
||||||
SyncingFolder = "";
|
SyncingFolder = "";
|
||||||
PreviousUrl = "";
|
PreviousUrl = "";
|
||||||
|
|
Loading…
Reference in a new issue