mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Relative Date - FileAge
This commit is contained in:
parent
f6103b1105
commit
d726455b04
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue