join online notification resolver fix.

This commit is contained in:
Burak Kaan Köse
2026-04-12 19:42:50 +02:00
parent 10c797fba4
commit 3977401057
3 changed files with 26 additions and 2 deletions
+21
View File
@@ -593,6 +593,12 @@ public partial class App : WinoApplication,
await HandleCalendarToastSnoozeAsync(userInput, calendarItemId);
return;
}
if (calendarAction == Constants.ToastCalendarJoinOnlineAction)
{
await HandleCalendarToastJoinOnlineAsync(calendarItemId);
return;
}
}
// Check if this is a navigation toast (user clicked the notification).
@@ -711,6 +717,21 @@ public partial class App : WinoApplication,
await calendarService.SnoozeCalendarItemAsync(calendarItemId, snoozedUntilLocal);
}
private async Task HandleCalendarToastJoinOnlineAsync(Guid calendarItemId)
{
var calendarService = Services.GetRequiredService<ICalendarService>();
var nativeAppService = Services.GetRequiredService<INativeAppService>();
var calendarItem = await calendarService.GetCalendarItemAsync(calendarItemId);
if (calendarItem == null ||
!Uri.TryCreate(calendarItem.HtmlLink, UriKind.Absolute, out var joinUri))
{
return;
}
await nativeAppService.LaunchUriAsync(joinUri);
}
private bool TryGetSnoozeDurationMinutes(IDictionary<string, string>? userInput, out int snoozeDurationMinutes)
{
snoozeDurationMinutes = _preferencesService?.DefaultSnoozeDurationInMinutes ?? 0;