Skip to content

Commit

Permalink
some improvements to pdf preview
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Nov 5, 2023
1 parent 19c1916 commit ec5d11a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ object ContextUtils {
if (
intent.type?.contains("pdf") == true
) {
intent.data?.let(onHasPdfUri) ?: intent.parcelable<Uri>(Intent.EXTRA_STREAM)
?.let(onHasPdfUri)
val uri = intent.data ?: intent.parcelable<Uri>(Intent.EXTRA_STREAM)
uri?.let {
if (intent.action == Intent.ACTION_VIEW) {
navigate(Screen.PdfTools(Screen.PdfTools.Type.Preview(it)))
} else onHasPdfUri(uri)
}
} else {
intent.getStringExtra(Intent.EXTRA_TEXT)?.let {
navigate(Screen.LoadNetImage(it))
Expand Down

0 comments on commit ec5d11a

Please sign in to comment.