From d726455b047c380179243ff85ee132e7d601ba0c Mon Sep 17 00:00:00 2001 From: 01Dri Date: Sat, 24 May 2025 03:16:51 -0300 Subject: [PATCH] Relative Date - FileAge --- .../Views/PreviewPanel.xaml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs index 801510eb7..28ceb5e96 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs @@ -73,7 +73,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged ); string result = formattedDate; - if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetRelativeDate(createdDate)} - {formattedDate}"; + if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetFileAge(createdDate)} - {formattedDate}"; CreatedAt = result; } @@ -85,7 +85,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged CultureInfo.CurrentCulture ); string result = formattedDate; - if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetRelativeDate(lastModifiedDate)} - {formattedDate}"; + if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetFileAge(lastModifiedDate)} - {formattedDate}"; LastModifiedAt = result; } @@ -97,7 +97,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged PreviewImage = await Main.Context.API.LoadImageAsync(FilePath, true).ConfigureAwait(false); } - private string GetRelativeDate(DateTime fileDateTime) + private string GetFileAge(DateTime fileDateTime) { DateTime now = DateTime.Now; TimeSpan difference = now - fileDateTime;