Просмотр исходного кода

Fix the issue of unequal check for amiibo file date due to the lack o… (#4832)

* 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.
2435043xia 2 лет назад
Родитель
Сommit
42f7f98666

+ 1 - 1
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;

+ 1 - 1
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;