[ui] Only update relevant logs
This commit is contained in:
parent
05b6f610d9
commit
f5a3797e4c
|
@ -99,12 +99,9 @@ namespace SparkleShare {
|
|||
InvokeOnMainThread (delegate {
|
||||
|
||||
foreach (SparkleLog log in OpenLogs) {
|
||||
Console.WriteLine (log.LocalPath + " " +repository_path);
|
||||
if (log.LocalPath.Equals (repository_path)) {
|
||||
Console.WriteLine ("UPDATING " + repository_path);
|
||||
if (log.LocalPath.Equals (repository_path))
|
||||
log.UpdateEventLog ();
|
||||
}
|
||||
}
|
||||
|
||||
if (SparkleShare.Controller.NotificationsEnabled) {
|
||||
|
||||
|
|
|
@ -82,23 +82,18 @@ namespace SparkleShare {
|
|||
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email,
|
||||
string message, string repository_path) {
|
||||
|
||||
foreach (SparkleLog log in OpenLogs) {
|
||||
if (log.LocalPath.Equals (repository_path)) {
|
||||
Application.Invoke (delegate {
|
||||
log.UpdateEventLog ();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move to controller and do translation here
|
||||
foreach (SparkleLog log in OpenLogs) {
|
||||
if (log.LocalPath.Equals (repository_path))
|
||||
log.UpdateEventLog ();
|
||||
}
|
||||
|
||||
if (!SparkleShare.Controller.NotificationsEnabled)
|
||||
return;
|
||||
|
||||
Application.Invoke (delegate {
|
||||
|
||||
SparkleBubble bubble = new SparkleBubble (user_name, message);
|
||||
|
||||
string avatar_file_path = SparkleUIHelpers.GetAvatar (user_email, 32);
|
||||
|
||||
if (avatar_file_path != null)
|
||||
|
|
Loading…
Reference in a new issue