Skip to content

Commit 569046b

Browse files
author
TheBestPessimist
committed
Fix private function naming convention
1 parent 96afa29 commit 569046b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
8383
{
8484
try
8585
{
86-
_openFolder(path);
86+
OpenFolder(path);
8787
return true;
8888
}
8989
catch (Exception ex)
@@ -131,7 +131,7 @@ internal static Result CreateDriveSpaceDisplayResult(string path, string actionK
131131
ProgressBarColor = progressBarColor,
132132
Action = _ =>
133133
{
134-
_openFolder(path);
134+
OpenFolder(path);
135135
return true;
136136
},
137137
TitleToolTip = path,
@@ -192,7 +192,7 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK
192192
CopyText = folderPath,
193193
Action = _ =>
194194
{
195-
_openFolder(folderPath);
195+
OpenFolder(folderPath);
196196
return true;
197197
},
198198
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = folderPath, WindowsIndexed = windowsIndexed }
@@ -201,7 +201,7 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK
201201

202202
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
203203
{
204-
Result.PreviewInfo preview = _isMedia(Path.GetExtension(filePath))
204+
Result.PreviewInfo preview = IsMedia(Path.GetExtension(filePath))
205205
? new Result.PreviewInfo { IsMedia = true, PreviewImagePath = filePath, }
206206
: Result.PreviewInfo.Default;
207207

@@ -224,15 +224,15 @@ internal static Result CreateFileResult(string filePath, Query query, int score
224224
// TODO Why do we check if file exists here, but not in the other if conditions?
225225
if (File.Exists(filePath) && c.SpecialKeyState.CtrlPressed && c.SpecialKeyState.ShiftPressed)
226226
{
227-
_openFileAsAdmin(filePath);
227+
OpenFileAsAdmin(filePath);
228228
}
229229
else if (c.SpecialKeyState.CtrlPressed)
230230
{
231-
_openFolder(filePath, filePath);
231+
OpenFolder(filePath, filePath);
232232
}
233233
else
234234
{
235-
_openFile(filePath);
235+
OpenFile(filePath);
236236
}
237237
}
238238
catch (Exception ex)
@@ -249,7 +249,7 @@ internal static Result CreateFileResult(string filePath, Query query, int score
249249
return result;
250250
}
251251

252-
private static bool _isMedia(string extension)
252+
private static bool IsMedia(string extension)
253253
{
254254
if (string.IsNullOrEmpty(extension))
255255
{
@@ -261,25 +261,25 @@ private static bool _isMedia(string extension)
261261
}
262262
}
263263

264-
private static void _openFile(string filePath)
264+
private static void OpenFile(string filePath)
265265
{
266-
_incrementEverythingRunCounterIfNeeded(filePath);
266+
IncrementEverythingRunCounterIfNeeded(filePath);
267267
FilesFolders.OpenPath(filePath);
268268
}
269269

270-
private static void _openFolder(string folderPath, string fileNameOrFilePath=null)
270+
private static void OpenFolder(string folderPath, string fileNameOrFilePath = null)
271271
{
272-
_incrementEverythingRunCounterIfNeeded(folderPath);
272+
IncrementEverythingRunCounterIfNeeded(folderPath);
273273
Context.API.OpenDirectory(Path.GetDirectoryName(folderPath), fileNameOrFilePath);
274274
}
275275

276-
private static void _openFileAsAdmin(string filePath)
276+
private static void OpenFileAsAdmin(string filePath)
277277
{
278278
_ = Task.Run(() =>
279279
{
280280
try
281281
{
282-
_incrementEverythingRunCounterIfNeeded(filePath);
282+
IncrementEverythingRunCounterIfNeeded(filePath);
283283
Process.Start(new ProcessStartInfo
284284
{
285285
FileName = filePath,
@@ -295,7 +295,7 @@ private static void _openFileAsAdmin(string filePath)
295295
});
296296
}
297297

298-
private static void _incrementEverythingRunCounterIfNeeded(string fileOrFolder)
298+
private static void IncrementEverythingRunCounterIfNeeded(string fileOrFolder)
299299
{
300300
if (Settings.EverythingEnabled)
301301
_ = Task.Run(() => EverythingApi.IncrementRunCounterAsync(fileOrFolder));

0 commit comments

Comments
 (0)