From 142b95f0ae82a849b1e9ef390a2a068b4c792be6 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 22 Sep 2019 22:47:07 -0700 Subject: Optimize imports and update changelog --- app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt') 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 } } -- cgit v1.2.3