Skip to content

Commit 88a7408

Browse files
committed
remove stray orphaned block
1 parent 9c1b00b commit 88a7408

1 file changed

Lines changed: 27 additions & 35 deletions

File tree

StabilityMatrix.Avalonia/Services/NotificationService.cs

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void Initialize(
4141
notificationManager = new WindowNotificationManager(TopLevel.GetTopLevel(visual))
4242
{
4343
Position = position,
44-
MaxItems = maxItems
44+
MaxItems = maxItems,
4545
};
4646
}
4747

@@ -50,10 +50,6 @@ public void Show(INotification notification)
5050
// Must marshal to UI thread - WindowNotificationManager requires it
5151
Dispatcher.UIThread.Invoke(() => notificationManager?.Show(notification));
5252
}
53-
{
54-
notificationManager?.Show(notification);
55-
}
56-
}
5753

5854
/// <inheritdoc />
5955
public Task ShowPersistentAsync(NotificationKey key, DesktopNotifications.Notification notification)
@@ -99,25 +95,23 @@ bool isPersistent
9995
// Show app toast
10096
if (isPersistent)
10197
{
102-
Dispatcher.UIThread.Invoke(
103-
() =>
104-
ShowPersistent(
105-
notification.Title ?? "",
106-
notification.Body ?? "",
107-
key.Level.ToNotificationType()
108-
)
98+
Dispatcher.UIThread.Invoke(() =>
99+
ShowPersistent(
100+
notification.Title ?? "",
101+
notification.Body ?? "",
102+
key.Level.ToNotificationType()
103+
)
109104
);
110105
}
111106
else
112107
{
113-
Dispatcher.UIThread.Invoke(
114-
() =>
115-
Show(
116-
notification.Title ?? "",
117-
notification.Body ?? "",
118-
key.Level.ToNotificationType(),
119-
expiration
120-
)
108+
Dispatcher.UIThread.Invoke(() =>
109+
Show(
110+
notification.Title ?? "",
111+
notification.Body ?? "",
112+
key.Level.ToNotificationType(),
113+
expiration
114+
)
121115
);
122116
}
123117
return;
@@ -135,25 +129,23 @@ await nativeManager.ShowNotification(
135129
// Show app toast
136130
if (isPersistent)
137131
{
138-
Dispatcher.UIThread.Invoke(
139-
() =>
140-
ShowPersistent(
141-
notification.Title ?? "",
142-
notification.Body ?? "",
143-
key.Level.ToNotificationType()
144-
)
132+
Dispatcher.UIThread.Invoke(() =>
133+
ShowPersistent(
134+
notification.Title ?? "",
135+
notification.Body ?? "",
136+
key.Level.ToNotificationType()
137+
)
145138
);
146139
}
147140
else
148141
{
149-
Dispatcher.UIThread.Invoke(
150-
() =>
151-
Show(
152-
notification.Title ?? "",
153-
notification.Body ?? "",
154-
key.Level.ToNotificationType(),
155-
expiration
156-
)
142+
Dispatcher.UIThread.Invoke(() =>
143+
Show(
144+
notification.Title ?? "",
145+
notification.Body ?? "",
146+
key.Level.ToNotificationType(),
147+
expiration
148+
)
157149
);
158150
}
159151

0 commit comments

Comments
 (0)