diff options
author | Allan Wang <me@allanwang.ca> | 2019-09-28 23:53:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-28 23:53:40 -0700 |
commit | 73e16427879908e8b46b7c9fe1e87b0df838fa78 (patch) | |
tree | c3ae5a6890b0797110f397b99812362312c07ff6 /app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt | |
parent | 58309cfd62ed26f3cf5d2b1cb933f50078937a3a (diff) | |
parent | f5ae18fc0d824dbdce5523128f9ded86bdfa6d08 (diff) | |
download | frost-73e16427879908e8b46b7c9fe1e87b0df838fa78.tar.gz frost-73e16427879908e8b46b7c9fe1e87b0df838fa78.tar.bz2 frost-73e16427879908e8b46b7c9fe1e87b0df838fa78.zip |
Merge branch 'dev' into desktop-url-convert
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt index 7fdd485d..9089d891 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt @@ -34,7 +34,7 @@ fun Context.showWebContextMenu(wc: WebContext) { if (wc.isEmpty) return var title = wc.url ?: string(R.string.menu) title = - title.substring(title.indexOf("m/") + 1) //just so if defaults to 0 in case it's not .com/ + title.substring(title.indexOf("m/") + 1) // just so if defaults to 0 in case it's not .com/ if (title.length > 100) title = title.substring(0, 100) + '\u2026' val menuItems = WebContextType.values @@ -46,7 +46,7 @@ fun Context.showWebContextMenu(wc: WebContext) { menuItems[position].onClick(this@showWebContextMenu, wc) } onDismiss { - //showing the dialog interrupts the touch down event, so we must ensure that the viewpager's swipe is enabled + // showing the dialog interrupts the touch down event, so we must ensure that the viewpager's swipe is enabled (this@showWebContextMenu as? MainActivity)?.viewPager?.enableSwipe = true } } |