Merge branch 'master' of git://github.com/hbons/SparkleShare into enhancements
This commit is contained in:
commit
74fc03f354
|
@ -149,18 +149,17 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool HasQueueDownAnnouncement (string folder_identifier)
|
public string NextQueueDownMessage (string folder_identifier)
|
||||||
{
|
{
|
||||||
this.queue_down = this.queue_down.Distinct ().ToList ();
|
|
||||||
|
|
||||||
foreach (SparkleAnnouncement announcement in this.queue_down.GetRange (0, this.queue_down.Count)) {
|
foreach (SparkleAnnouncement announcement in this.queue_down.GetRange (0, this.queue_down.Count)) {
|
||||||
if (announcement.FolderIdentifier.Equals (folder_identifier)) {
|
if (announcement.FolderIdentifier.Equals (folder_identifier)) {
|
||||||
|
string message = announcement.Message;
|
||||||
this.queue_down.Remove (announcement);
|
this.queue_down.Remove (announcement);
|
||||||
return true;
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -256,16 +256,20 @@ namespace SparkleLib {
|
||||||
this.listener.Announcement += delegate (SparkleAnnouncement announcement) {
|
this.listener.Announcement += delegate (SparkleAnnouncement announcement) {
|
||||||
string identifier = Identifier;
|
string identifier = Identifier;
|
||||||
|
|
||||||
if (announcement.FolderIdentifier == identifier &&
|
if (announcement.FolderIdentifier.Equals (identifier) &&
|
||||||
!announcement.Message.Equals (CurrentRevision)) {
|
!announcement.Message.Equals (CurrentRevision)) {
|
||||||
|
|
||||||
if ((Status != SyncStatus.SyncUp) &&
|
if ((Status != SyncStatus.SyncUp) &&
|
||||||
(Status != SyncStatus.SyncDown) &&
|
(Status != SyncStatus.SyncDown) &&
|
||||||
!this.is_buffering) {
|
!this.is_buffering) {
|
||||||
|
|
||||||
while (this.listener.HasQueueDownAnnouncement (identifier))
|
string message;
|
||||||
|
while ((message = this.listener.NextQueueDownMessage (identifier)) != null) {
|
||||||
|
if (!message.Equals (CurrentRevision))
|
||||||
SyncDownBase ();
|
SyncDownBase ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Start listening
|
// Start listening
|
||||||
|
|
Loading…
Reference in a new issue