Skip to content

Commit

Permalink
🐛 fix notification interaction when an update is available
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfoucrier committed Dec 4, 2024
1 parent 1a83379 commit cff00e4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions code/Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,8 @@ public void Tip(string title, string text, Type icon = Type.Info, int duration =
/// <param name="balloon">Define if the interaction is provided by the balloon tip</param>
public async Task Interaction(bool balloon = false) {

// by default, always open the gmail inbox in a browser if the interaction is provided by a double click on the systray icon
if (Tag == null) {

if (!balloon) {
Process.Start($"{GetBaseURL()}/#inbox");
}

return;
}

// display the form and focus the update tab
if (balloon && UI.UpdateService.UpdateAvailable) {
if (balloon && UI.UpdateService.UpdateAvailable && (Tag == "update" || Tag == null)) {
UI.Visible = true;
UI.ShowInTaskbar = true;
UI.WindowState = FormWindowState.Normal;
Expand All @@ -101,6 +91,16 @@ public async Task Interaction(bool balloon = false) {
return;
}

// by default, always open the gmail inbox in a browser if the interaction is provided by a double click on the systray icon
if (Tag == null) {

if (!balloon) {
Process.Start($"{GetBaseURL()}/#inbox");
}

return;
}

// do nothing if the notification behavior is set to "do nothing"
if (balloon && Settings.Default.NotificationBehavior == (uint)Behavior.DoNothing) {
return;
Expand Down

0 comments on commit cff00e4

Please sign in to comment.