From 7c55986b2487674d7856a23b957646b7f91d2bba Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 10 Mar 2026 11:57:55 +0800 Subject: [PATCH] Rename private "*1" methods to "*Core" for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored private methods previously suffixed with "1" to use the "Core" suffix instead (e.g., GetWallpaperBrush1 → GetWallpaperBrushCore). Updated all corresponding invocations. This improves naming consistency and aligns with common conventions for core logic methods. --- Flow.Launcher/Helper/WallpaperPathRetrieval.cs | 4 ++-- Flow.Launcher/MessageBoxEx.xaml.cs | 4 ++-- Flow.Launcher/ProgressBoxEx.xaml.cs | 4 ++-- Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/Helper/WallpaperPathRetrieval.cs b/Flow.Launcher/Helper/WallpaperPathRetrieval.cs index 92b6d5cdd..32c5f4aea 100644 --- a/Flow.Launcher/Helper/WallpaperPathRetrieval.cs +++ b/Flow.Launcher/Helper/WallpaperPathRetrieval.cs @@ -22,10 +22,10 @@ public static class WallpaperPathRetrieval public static Brush GetWallpaperBrush() { // Invoke the method on the UI thread - return DispatcherHelper.Invoke(GetWallpaperBrush1); + return DispatcherHelper.Invoke(GetWallpaperBrushCore); } - private static Brush GetWallpaperBrush1() + private static Brush GetWallpaperBrushCore() { try { diff --git a/Flow.Launcher/MessageBoxEx.xaml.cs b/Flow.Launcher/MessageBoxEx.xaml.cs index 469733357..14bda4c0f 100644 --- a/Flow.Launcher/MessageBoxEx.xaml.cs +++ b/Flow.Launcher/MessageBoxEx.xaml.cs @@ -30,10 +30,10 @@ namespace Flow.Launcher MessageBoxImage icon = MessageBoxImage.None, MessageBoxResult defaultResult = MessageBoxResult.OK) { - return DispatcherHelper.Invoke(() => Show1(messageBoxText, caption, button, icon, defaultResult)); + return DispatcherHelper.Invoke(() => ShowCore(messageBoxText, caption, button, icon, defaultResult)); } - private static MessageBoxResult Show1( + private static MessageBoxResult ShowCore( string messageBoxText, string caption = "", MessageBoxButton button = MessageBoxButton.OK, diff --git a/Flow.Launcher/ProgressBoxEx.xaml.cs b/Flow.Launcher/ProgressBoxEx.xaml.cs index 7874f118e..cc75b0e26 100644 --- a/Flow.Launcher/ProgressBoxEx.xaml.cs +++ b/Flow.Launcher/ProgressBoxEx.xaml.cs @@ -52,10 +52,10 @@ namespace Flow.Launcher private void ReportProgress(double progress) { - DispatcherHelper.Invoke(() => ReportProgress1(progress)); + DispatcherHelper.Invoke(() => ReportProgressCore(progress)); } - private void ReportProgress1(double progress) + private void ReportProgressCore(double progress) { if (progress < 0) { diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 6dd27bca5..757089dcb 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -764,10 +764,10 @@ namespace Flow.Launcher.ViewModel public void ChangeQueryText(string queryText, bool isReQuery = false) { // Must check access so that we will not block the UI thread which causes window visibility issue - DispatcherHelper.Invoke(() => ChangeQueryText1(queryText, isReQuery)); + DispatcherHelper.Invoke(() => ChangeQueryTextCore(queryText, isReQuery)); } - private void ChangeQueryText1(string queryText, bool isReQuery = false) + private void ChangeQueryTextCore(string queryText, bool isReQuery = false) { if (QueryText != queryText) {