lib: Code cleanup

This commit is contained in:
Hylke Bons 2012-07-22 11:51:56 +02:00
parent 9870ea4475
commit 7d9e963c73
2 changed files with 17 additions and 25 deletions

View file

@ -154,8 +154,7 @@ namespace SparkleLib {
AcceptHostKey (host_key, warn); AcceptHostKey (host_key, warn);
this.thread = new Thread ( this.thread = new Thread (() => {
new ThreadStart (delegate {
if (Fetch ()) { if (Fetch ()) {
Thread.Sleep (500); Thread.Sleep (500);
SparkleHelpers.DebugInfo ("Fetcher", "Finished"); SparkleHelpers.DebugInfo ("Fetcher", "Finished");
@ -173,8 +172,7 @@ namespace SparkleLib {
IsActive = false; IsActive = false;
Failed (); Failed ();
} }
}) });
);
this.thread.Start (); this.thread.Start ();
} }

View file

@ -61,13 +61,7 @@ namespace SparkleLib {
if (repo.Name.Equals (repo_name) && !repo.IsBuffering && if (repo.Name.Equals (repo_name) && !repo.IsBuffering &&
(repo.Status != SyncStatus.SyncUp && repo.Status != SyncStatus.SyncDown)) { (repo.Status != SyncStatus.SyncUp && repo.Status != SyncStatus.SyncDown)) {
Thread thread = new Thread ( new Thread (() => repo.OnFileActivity (args)).Start ();
new ThreadStart (delegate {
repo.OnFileActivity (args);
})
);
thread.Start ();
} }
} }
} }