refresh ui when adding new folder and fix syncing

This commit is contained in:
Hylke Bons 2010-05-29 16:18:38 +02:00
parent 2aa7576a84
commit b29e3b3b49
2 changed files with 13 additions and 10 deletions

View file

@ -205,6 +205,7 @@ namespace SparkleShare {
Process.Start();
} );
Destroy ();
SparkleShare.SparkleUI = new SparkleUI (true);
};

View file

@ -108,6 +108,18 @@ namespace SparkleShare {
FetchTimer.Start();
BufferTimer = new Timer ();
BufferTimer.Elapsed += delegate (object o, ElapsedEventArgs args) {
Console.WriteLine ("[Buffer][" + Name + "] Done waiting.");
Add ();
string Message = FormatCommitMessage ();
if (!Message.Equals ("")) {
Commit (Message);
Fetch ();
Push ();
}
};
// Add everything that changed
// since SparkleShare was stopped
Add ();
@ -151,16 +163,6 @@ namespace SparkleShare {
BufferTimer.Close ();
BufferTimer = new Timer ();
BufferTimer.Interval = Interval;
BufferTimer.Elapsed += delegate (object o, ElapsedEventArgs args) {
Console.WriteLine ("[Buffer][" + Name + "] Done waiting.");
Add ();
string Message = FormatCommitMessage ();
if (!Message.Equals ("")) {
Commit (Message);
Fetch ();
Push ();
}
};
FetchTimer.Start ();