We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6933132 commit 12a4ee7Copy full SHA for 12a4ee7
app/src/main/java/com/amrdeveloper/linkhub/util/LinkBottomSheetDialog.kt
@@ -1,7 +1,6 @@
1
package com.amrdeveloper.linkhub.util
2
3
import android.app.Activity
4
-import android.content.ActivityNotFoundException
5
import android.content.ClipData
6
import android.content.ClipboardManager
7
import android.content.Context
@@ -43,7 +42,8 @@ object LinkBottomSheetDialog {
43
42
dialogBinding.dialogOpenAction.setOnClickListener {
44
try {
45
openLinkIntent(activity, link.url)
46
- } catch (e: ActivityNotFoundException) {
+ } catch (_: Exception) {
+ // TODO: improve error message, and replace try catch with tag union errors
47
activity.showSnackBar(R.string.message_link_invalid)
48
}
49
bottomSheetDialog.dismiss()
0 commit comments