From 60343d218940fc91e3ea6e67cec57277a7e60c8e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 11 Jun 2022 22:23:50 +0200 Subject: [PATCH] show the filename at PDF Viewer earlier --- .../filemanager/pro/activities/PDFViewerActivity.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt index 79656bb5..29255855 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt @@ -41,6 +41,7 @@ class PDFViewerActivity : SimpleActivity() { if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { realFilePath = intent.extras?.get(REAL_FILE_PATH)?.toString() ?: "" + supportActionBar?.title = realFilePath.getFilenameFromPath() } checkIntent() @@ -91,11 +92,9 @@ class PDFViewerActivity : SimpleActivity() { showSystemUI(true) - pdf_viewer_wrapper.onGlobalLayout { - val filename = getFilenameFromUri(uri) - if (filename.isNotEmpty()) { - supportActionBar?.title = filename - } + val filename = getFilenameFromUri(uri) + if (filename.isNotEmpty()) { + supportActionBar?.title = filename } }