From 42f7f986661ef7ba65996e56d8448cb8f8985515 Mon Sep 17 00:00:00 2001 From: 2435043xia <363032601@qq.com> Date: Fri, 12 May 2023 01:10:24 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20the=20issue=20of=20unequal=20check=20for?= =?UTF-8?q?=20amiibo=20file=20date=20due=20to=20the=20lack=20o=E2=80=A6=20?= =?UTF-8?q?(#4832)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix the issue of unequal check for amiibo file date due to the lack of sub-second units in the header, causing slow opening of the amiibo interface. * Supplement the unrepaired. --- src/Ryujinx.Ava/UI/ViewModels/AmiiboWindowViewModel.cs | 2 +- src/Ryujinx/Ui/Windows/AmiiboWindow.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Ava/UI/ViewModels/AmiiboWindowViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/AmiiboWindowViewModel.cs index bb92798fa..ead1a1442 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/AmiiboWindowViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/AmiiboWindowViewModel.cs @@ -370,7 +370,7 @@ namespace Ryujinx.Ava.UI.ViewModels if (response.IsSuccessStatusCode) { - return response.Content.Headers.LastModified != oldLastModified; + return response.Content.Headers.LastModified != new DateTimeOffset(oldLastModified.Ticks - (oldLastModified.Ticks % TimeSpan.TicksPerSecond), TimeSpan.Zero); } return false; diff --git a/src/Ryujinx/Ui/Windows/AmiiboWindow.cs b/src/Ryujinx/Ui/Windows/AmiiboWindow.cs index 11a566d8d..9cfb29427 100644 --- a/src/Ryujinx/Ui/Windows/AmiiboWindow.cs +++ b/src/Ryujinx/Ui/Windows/AmiiboWindow.cs @@ -180,7 +180,7 @@ namespace Ryujinx.Ui.Windows if (response.IsSuccessStatusCode) { - return response.Content.Headers.LastModified != oldLastModified; + return response.Content.Headers.LastModified != new DateTimeOffset(oldLastModified.Ticks - (oldLastModified.Ticks % TimeSpan.TicksPerSecond), TimeSpan.Zero); } return false;