repo base: disable watching by using the existing method instead
This commit is contained in:
parent
d8cb155728
commit
16b73f82d0
|
@ -333,7 +333,7 @@ namespace SparkleLib {
|
||||||
private void SyncUpBase ()
|
private void SyncUpBase ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.local_timer.Stop ();
|
DisableWatching ();
|
||||||
this.remote_timer.Stop ();
|
this.remote_timer.Stop ();
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("SyncUp", "[" + Name + "] Initiated");
|
SparkleHelpers.DebugInfo ("SyncUp", "[" + Name + "] Initiated");
|
||||||
|
@ -373,7 +373,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
this.remote_timer.Start ();
|
this.remote_timer.Start ();
|
||||||
this.local_timer.Start ();
|
EnableWatching ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ namespace SparkleLib {
|
||||||
{
|
{
|
||||||
SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Initiated");
|
SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Initiated");
|
||||||
this.remote_timer.Stop ();
|
this.remote_timer.Stop ();
|
||||||
this.local_timer.Stop ();
|
DisableWatching ();
|
||||||
|
|
||||||
if (SyncStatusChanged != null)
|
if (SyncStatusChanged != null)
|
||||||
SyncStatusChanged (SyncStatus.SyncDown);
|
SyncStatusChanged (SyncStatus.SyncDown);
|
||||||
|
@ -415,19 +415,21 @@ namespace SparkleLib {
|
||||||
SyncStatusChanged (SyncStatus.Idle);
|
SyncStatusChanged (SyncStatus.Idle);
|
||||||
|
|
||||||
this.remote_timer.Start ();
|
this.remote_timer.Start ();
|
||||||
this.local_timer.Start ();
|
EnableWatching ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void DisableWatching ()
|
public void DisableWatching ()
|
||||||
{
|
{
|
||||||
this.watcher.EnableRaisingEvents = false;
|
this.watcher.EnableRaisingEvents = false;
|
||||||
|
this.local_timer.Stop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void EnableWatching ()
|
public void EnableWatching ()
|
||||||
{
|
{
|
||||||
this.watcher.EnableRaisingEvents = true;
|
this.watcher.EnableRaisingEvents = true;
|
||||||
|
this.local_timer.Start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue