statusicon: Fix resume from pause

This commit is contained in:
Hylke Bons 2014-10-31 11:01:03 +00:00
parent e04d2957f8
commit a3ebfb8e55
2 changed files with 13 additions and 12 deletions

View file

@ -210,14 +210,16 @@ namespace SparkleLib {
{
// Sync up everything that changed since we've been offline
new Thread (() => {
if (HasRemoteChanges)
SyncDownBase ();
if (Status != SyncStatus.Paused) {
if (HasRemoteChanges)
SyncDownBase ();
if (HasUnsyncedChanges || HasLocalChanges) {
do {
SyncUpBase ();
if (HasUnsyncedChanges || HasLocalChanges) {
do {
SyncUpBase ();
} while (HasLocalChanges);
} while (HasLocalChanges);
}
}
if (!UseCustomWatcher)
@ -314,10 +316,8 @@ namespace SparkleLib {
public void ForceRetry ()
{
if (Error == ErrorStatus.None || this.is_syncing)
return;
SyncUpBase ();
if (Error != ErrorStatus.None && !this.is_syncing)
SyncUpBase ();
}
@ -592,6 +592,8 @@ namespace SparkleLib {
if (Status == SyncStatus.Paused) {
this.local_config.SetFolderOptionalAttribute (Name, "paused", bool.FalseString);
Status = SyncStatus.Idle;
SyncUpBase ();
}
}

View file

@ -314,9 +314,8 @@ namespace SparkleShare {
public void ResumeClicked (string project)
{
GetRepoByName (project).Resume ("");
new Thread (() => GetRepoByName (project).Resume ("")).Start ();
UpdateMenuEvent (CurrentState);
TryAgainClicked (project);
}
public void TryAgainClicked (string project)