[ui] Only update relevant logs
This commit is contained in:
parent
c1c63a9c7d
commit
7c3d98c485
|
@ -99,11 +99,8 @@ namespace SparkleShare {
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
|
|
||||||
foreach (SparkleLog log in OpenLogs) {
|
foreach (SparkleLog log in OpenLogs) {
|
||||||
Console.WriteLine (log.LocalPath + " " +repository_path);
|
if (log.LocalPath.Equals (repository_path))
|
||||||
if (log.LocalPath.Equals (repository_path)) {
|
|
||||||
Console.WriteLine ("UPDATING " + repository_path);
|
|
||||||
log.UpdateEventLog ();
|
log.UpdateEventLog ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SparkleShare.Controller.NotificationsEnabled) {
|
if (SparkleShare.Controller.NotificationsEnabled) {
|
||||||
|
|
|
@ -82,23 +82,18 @@ namespace SparkleShare {
|
||||||
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email,
|
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email,
|
||||||
string message, string repository_path) {
|
string message, string repository_path) {
|
||||||
|
|
||||||
foreach (SparkleLog log in OpenLogs) {
|
Application.Invoke (delegate {
|
||||||
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)
|
if (!SparkleShare.Controller.NotificationsEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Application.Invoke (delegate {
|
|
||||||
|
|
||||||
SparkleBubble bubble = new SparkleBubble (user_name, message);
|
|
||||||
|
|
||||||
|
SparkleBubble bubble = new SparkleBubble (user_name, message);
|
||||||
string avatar_file_path = SparkleUIHelpers.GetAvatar (user_email, 32);
|
string avatar_file_path = SparkleUIHelpers.GetAvatar (user_email, 32);
|
||||||
|
|
||||||
if (avatar_file_path != null)
|
if (avatar_file_path != null)
|
||||||
|
|
Loading…
Reference in a new issue