Code quality

This commit is contained in:
Jack251970 2025-04-01 19:18:32 +08:00
parent a3c18a6e3b
commit 8e8b5dbbba

View file

@ -6,7 +6,6 @@ using System.Threading.Tasks;
using System.Windows;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
@ -24,7 +23,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
get
{
var size = GetLogFiles().Sum(file => file.Length);
return $"{InternationalizationManager.Instance.GetTranslation("clearlogfolder")} ({BytesToReadableString(size)})";
return $"{App.API.GetTranslation("clearlogfolder")} ({BytesToReadableString(size)})";
}
}
@ -42,7 +41,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
};
public string ActivatedTimes => string.Format(
InternationalizationManager.Instance.GetTranslation("about_activate_times"),
App.API.GetTranslation("about_activate_times"),
_settings.ActivateTimes
);
@ -88,8 +87,8 @@ public partial class SettingsPaneAboutViewModel : BaseModel
private void AskClearLogFolderConfirmation()
{
var confirmResult = App.API.ShowMsgBox(
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
App.API.GetTranslation("clearlogfolderMessage"),
App.API.GetTranslation("clearlogfolder"),
MessageBoxButton.YesNo
);
@ -121,7 +120,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
}
[RelayCommand]
private Task UpdateApp() => _updater.UpdateAppAsync(false);
private Task UpdateAppAsync() => _updater.UpdateAppAsync(false);
private void ClearLogFolder()
{