repo: don't show notifications for changes that you made yourself elsewhere
This commit is contained in:
parent
93a921322b
commit
51d5735f28
|
@ -386,7 +386,10 @@ namespace SparkleLib {
|
|||
|
||||
ChangeSets = GetChangeSets ();
|
||||
|
||||
if (!pre_sync_revision.Equals (CurrentRevision) && ChangeSets != null && ChangeSets.Count > 0) {
|
||||
if (!pre_sync_revision.Equals (CurrentRevision) &&
|
||||
ChangeSets != null && ChangeSets.Count > 0 &&
|
||||
!ChangeSets [0].User.Name.Equals (this.local_config.User.Name)) {
|
||||
|
||||
bool emit_change_event = true;
|
||||
|
||||
foreach (SparkleChange change in ChangeSets [0].Changes) {
|
||||
|
|
|
@ -51,22 +51,12 @@ namespace SparkleLib {
|
|||
case SparkleChangeType.Moved: message = "moved ‘{0}’"; break;
|
||||
}
|
||||
|
||||
if (Changes.Count == 1) {
|
||||
return message = string.Format (message, Changes [0].Path);
|
||||
|
||||
} else if (Changes.Count > 1) {
|
||||
message = string.Format (message, Changes [0].Path);
|
||||
|
||||
if ((Changes.Count - 1) == 1)
|
||||
return string.Format (message + " and one other event", Changes.Count - 1);
|
||||
if (Changes.Count > 0)
|
||||
return string.Format (message, Changes [0].Path);
|
||||
else
|
||||
return string.Format (message + " and {0} other events", Changes.Count - 1);
|
||||
|
||||
} else {
|
||||
return "did something magical";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class SparkleChange {
|
||||
|
|
Loading…
Reference in a new issue