Improve FileLoadedTooltip logic to handle empty loaded file name case

This commit is contained in:
Thorsten Sommer 2026-07-21 09:53:24 +02:00
parent a8169bc6b4
commit 58de8f1a7e
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -376,7 +376,10 @@ public partial class ReadFileContent : MSGComponentBase
private string FileLoadedTooltip()
{
if (!this.hasLoadedFileContent || string.IsNullOrWhiteSpace(this.loadedFileName))
if (!this.hasLoadedFileContent)
return string.Empty;
if (string.IsNullOrWhiteSpace(this.loadedFileName))
return this.T("File content loaded");
return string.Format(this.T("Attached file '{0}'."), this.loadedFileName);