Skip to content

Commit 256437e

Browse files
committed
fix(preview): handle titles nicer
#350 (comment)
1 parent 25f34e8 commit 256437e

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/rovr/core/preview_container.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,12 +1165,7 @@ def show_normal_file_preview(self) -> None:
11651165
if should_cancel():
11661166
return
11671167

1168-
self.set_border(
1169-
"title",
1170-
f"{titles.file} ({self._mime_type.method})"
1171-
if self._mime_type
1172-
else titles.file,
1173-
)
1168+
self.set_border("title", titles.file)
11741169

11751170
assert self._current_file_path is not None
11761171
realpath = path.realpath(self._current_file_path)
@@ -1663,7 +1658,8 @@ def mount_special_messages(self) -> None:
16631658
self.log(self._mime_type)
16641659
assert isinstance(self._current_content, str)
16651660
self.set_border(
1666-
"title", self._mime_type.method if self._mime_type else "Preview"
1661+
"title",
1662+
"Preview" + (f" ({self._mime_type.method})" if self._mime_type else ""),
16671663
)
16681664

16691665
display_content: str = self._current_content

0 commit comments

Comments
 (0)