fix dailynote activation exiting

This commit is contained in:
DismissedLight
2023-08-26 21:50:50 +08:00
parent eb557afd18
commit 14c75d7c04
2 changed files with 14 additions and 8 deletions

View File

@@ -241,10 +241,16 @@ internal sealed class Activation : IActivation
{
case UrlActionRefresh:
{
await serviceProvider
.GetRequiredService<IDailyNoteService>()
.RefreshDailyNotesAsync()
.ConfigureAwait(false);
try
{
await serviceProvider
.GetRequiredService<IDailyNoteService>()
.RefreshDailyNotesAsync()
.ConfigureAwait(false);
}
catch
{
}
// Check if it's redirected.
if (!isRedirected)

View File

@@ -116,10 +116,10 @@ internal sealed partial class DailyNoteService : IDailyNoteService, IRecipient<U
}
Web.Response.Response<WebDailyNote> dailyNoteResponse = await serviceProvider
.GetRequiredService<IOverseaSupportFactory<IGameRecordClient>>()
.Create(PlayerUid.IsOversea(entry.Uid))
.GetDailyNoteAsync(new(entry.User, entry.Uid))
.ConfigureAwait(false);
.GetRequiredService<IOverseaSupportFactory<IGameRecordClient>>()
.Create(PlayerUid.IsOversea(entry.Uid))
.GetDailyNoteAsync(new(entry.User, entry.Uid))
.ConfigureAwait(false);
if (dailyNoteResponse.IsOk())
{