Skip to content

Commit

Permalink
Swap tests to favor a more specific one first
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Jan 14, 2025
1 parent 8866d9e commit dc8f283
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1453,19 +1453,19 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
.putExtra("android.content.extra.FANCY", true)
if (prefs.isDocumentStorage) {
try {
onDocumentTree.launch(docTreeIntent)
} catch (_: ActivityNotFoundException) {
onDocumentTree.launch(docTreeIntent.setType("*/*"))
} catch (_: ActivityNotFoundException) {
onDocumentTree.launch(docTreeIntent)
}
return
}
FittedSheets.newInstance().apply {
setTitleText(this@BrowserActivity.getString(R.string.storage_setup))
setPositiveButton(this@BrowserActivity.getString(R.string.proceed)) {
try {
onDocumentTree.launch(docTreeIntent)
} catch (_: ActivityNotFoundException) {
onDocumentTree.launch(docTreeIntent.setType("*/*"))
} catch (_: ActivityNotFoundException) {
onDocumentTree.launch(docTreeIntent)
}
}
setNegativeButton(this@BrowserActivity.getString(R.string.close)) {
Expand Down

0 comments on commit dc8f283

Please sign in to comment.