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.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
|
||||
namespace SparkleLib {
|
||||
|
||||
|
@ -136,6 +137,18 @@ namespace SparkleLib {
|
|||
this.git.WaitForExit ();
|
||||
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) {
|
||||
return false;
|
||||
|
|
|
@ -183,7 +183,7 @@ namespace SparkleLib {
|
|||
|
||||
protected void OnProgressChanged (double percentage) {
|
||||
if (ProgressChanged != null)
|
||||
ProgressChanged (percentage);
|
||||
ProgressChanged (percentage);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -331,7 +331,6 @@ namespace SparkleShare {
|
|||
if (ChangePageEvent != null)
|
||||
ChangePageEvent (PageType.Finished, warnings);
|
||||
|
||||
|
||||
PreviousAddress = "";
|
||||
SyncingFolder = "";
|
||||
PreviousUrl = "";
|
||||
|
|
Loading…
Reference in a new issue