Skip to content

Commit 60343d2

Browse files
committed
show the filename at PDF Viewer earlier
1 parent b9c3913 commit 60343d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class PDFViewerActivity : SimpleActivity() {
4141

4242
if (intent.extras?.containsKey(REAL_FILE_PATH) == true) {
4343
realFilePath = intent.extras?.get(REAL_FILE_PATH)?.toString() ?: ""
44+
supportActionBar?.title = realFilePath.getFilenameFromPath()
4445
}
4546

4647
checkIntent()
@@ -91,11 +92,9 @@ class PDFViewerActivity : SimpleActivity() {
9192

9293
showSystemUI(true)
9394

94-
pdf_viewer_wrapper.onGlobalLayout {
95-
val filename = getFilenameFromUri(uri)
96-
if (filename.isNotEmpty()) {
97-
supportActionBar?.title = filename
98-
}
95+
val filename = getFilenameFromUri(uri)
96+
if (filename.isNotEmpty()) {
97+
supportActionBar?.title = filename
9998
}
10099
}
101100

0 commit comments

Comments
 (0)