Skip to content

Commit 21299d1

Browse files
committed
Add FileName & FilePath as public properties
1 parent 9d3a0f0 commit 21299d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public partial class PreviewPanel : UserControl
2121
{
2222
private static readonly string ClassName = nameof(PreviewPanel);
2323

24-
private string FilePath { get; }
24+
public string FilePath { get; }
25+
public string FileName { get; }
2526
public string FileSize { get; private set; } = Main.Context.API.GetTranslation("plugin_explorer_plugin_tooltip_more_info_unknown");
2627
public string CreatedAt { get; } = "";
2728
public string LastModifiedAt { get; } = "";
@@ -57,11 +58,11 @@ private set
5758

5859
public PreviewPanel(Settings settings, string filePath, ResultType type)
5960
{
60-
InitializeComponent();
61-
6261
Settings = settings;
63-
6462
FilePath = filePath;
63+
FileName = Path.GetFileName(filePath);
64+
65+
InitializeComponent();
6566

6667
if (Settings.ShowFileSizeInPreviewPanel)
6768
{

0 commit comments

Comments
 (0)