[log] update when pushing has finished and fetch/push on a reconnect

This commit is contained in:
Hylke Bons 2010-10-07 20:40:23 +01:00
parent 2edeb35610
commit 0402a1d719
2 changed files with 9 additions and 4 deletions

View file

@ -328,6 +328,13 @@ namespace SparkleLib {
// Stop polling when the connection to the irc channel is succesful // Stop polling when the connection to the irc channel is succesful
Listener.Client.OnConnected += delegate { 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..."); SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Connected. Now listening...");
RemoteTimer.Stop (); RemoteTimer.Stop ();
@ -398,8 +405,6 @@ namespace SparkleLib {
LocalTimer.Start (); LocalTimer.Start ();
CheckForRemoteChanges ();
// Add everything that changed // Add everything that changed
// since SparkleShare was stopped // since SparkleShare was stopped
AddCommitAndPush (); AddCommitAndPush ();

View file

@ -149,7 +149,7 @@ namespace SparkleShare {
// Remove the eventhooks // Remove the eventhooks
repo.NewCommit -= UpdateEventLog; repo.NewCommit -= UpdateEventLog;
repo.PushingStarted -= UpdateEventLog; repo.PushingFinished -= UpdateEventLog;
} }
@ -192,7 +192,7 @@ namespace SparkleShare {
repo.NewCommit += UpdateEventLog; repo.NewCommit += UpdateEventLog;
// Update the log when changes are being sent // Update the log when changes are being sent
repo.PushingStarted += UpdateEventLog; repo.PushingFinished += UpdateEventLog;
break; break;