[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
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 ();

View file

@ -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;