From 6fb255c428f332e5b8c5d64a7aa4e6532fc5a680 Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Tue, 28 Jun 2022 17:01:13 +0800 Subject: [PATCH] fix --- src/AboutAppInfoPopup.cs | 2 +- .../UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AboutAppInfoPopup.cs b/src/AboutAppInfoPopup.cs index b5119e075..7912e6c96 100644 --- a/src/AboutAppInfoPopup.cs +++ b/src/AboutAppInfoPopup.cs @@ -178,7 +178,7 @@ namespace System.Application.UI var nativeHeapFreeSize = memoryInfo.AvailMem; var usedMemInBytes = nativeHeapSize - nativeHeapFreeSize; var usedMemInPercentage = usedMemInBytes * 100M / nativeHeapSize; - b.Append($"{IOPath.GetDisplayFileSizeString((float)usedMemInBytes)} ({usedMemInPercentage:0.00}%)"); + b.Append($"{IOPath.GetDisplayFileSizeString(usedMemInBytes)} ({usedMemInPercentage:0.00}%)"); #else b.Append(IOPath.GetDisplayFileSizeString(Environment.WorkingSet)); #endif diff --git a/src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs b/src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs index 5822409bb..329a13b93 100644 --- a/src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs +++ b/src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs @@ -156,7 +156,7 @@ namespace System.Application.UI.ViewModels Task.Run(async () => { var length = IOPath.GetDirectorySize(dirPath); - var lenString = IOPath.GetDisplayFileSizeString((float)length); + var lenString = IOPath.GetDisplayFileSizeString(length); await MainThread2.InvokeOnMainThreadAsync(() => { action(lenString);