diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index fed2dd4b..fd714ec7 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -328,6 +328,13 @@ namespace SparkleLib { // Stop polling when the connection to the irc channel is succesful Listener.Client.OnConnected += delegate { + // Check for changes manually one more time + CheckForRemoteChanges (); + + // Push changes that were made since the last disconnect + if (_HasUnsyncedChanges) + Push (); + SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Connected. Now listening..."); RemoteTimer.Stop (); @@ -398,8 +405,6 @@ namespace SparkleLib { LocalTimer.Start (); - CheckForRemoteChanges (); - // Add everything that changed // since SparkleShare was stopped AddCommitAndPush (); diff --git a/SparkleShare/SparkleLog.cs b/SparkleShare/SparkleLog.cs index 9d257fcc..c005dcf9 100644 --- a/SparkleShare/SparkleLog.cs +++ b/SparkleShare/SparkleLog.cs @@ -149,7 +149,7 @@ namespace SparkleShare { // Remove the eventhooks repo.NewCommit -= UpdateEventLog; - repo.PushingStarted -= UpdateEventLog; + repo.PushingFinished -= UpdateEventLog; } @@ -192,7 +192,7 @@ namespace SparkleShare { repo.NewCommit += UpdateEventLog; // Update the log when changes are being sent - repo.PushingStarted += UpdateEventLog; + repo.PushingFinished += UpdateEventLog; break;