diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-08 03:03:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-08 03:03:55 -0400 |
commit | b10a745c7f0f46f4f014e1ba7fa71172d7442b83 (patch) | |
tree | ef2516b69fb04ec0f565c5bb569fd5d80b7bd262 /app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt | |
parent | 6adfc496374eb88919f70a240eb15a726d2c18e0 (diff) | |
download | frost-1.2.tar.gz frost-1.2.tar.bz2 frost-1.2.zip |
Dev-1.1.7 (#39) - feature overload + context menuv1.2
* Address some crashlytics issues
* Add text scaling
* Kau fixes and cleanup
* WIP formatter
* Create in house url formatter
* Update context menu
* Update themes
* Test proguard without R
* Implement sharing and clean up context menu
* Disable viewpager swipe on long press
* Test keeping lib strings
* Update changelog and proguard
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt index c256b674..dda6c066 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt @@ -22,6 +22,7 @@ import com.pitchedapps.frost.contracts.ActivityWebContract import com.pitchedapps.frost.contracts.FileChooserContract import com.pitchedapps.frost.contracts.FileChooserDelegate import com.pitchedapps.frost.facebook.FbCookie +import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.utils.* import com.pitchedapps.frost.web.FrostWebView @@ -80,7 +81,7 @@ open class WebOverlayActivity : AppCompatActivity(), */ override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) - val newUrl = (intent.extras?.getString(ARG_URL) ?: intent.dataString).formattedFbUrl + val newUrl = (intent.extras?.getString(ARG_URL) ?: intent.dataString ?: return).formattedFbUrl L.d("New intent") if (url != newUrl) { this.intent = intent @@ -143,12 +144,7 @@ open class WebOverlayActivity : AppCompatActivity(), override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.action_copy_link -> copyToClipboard(frostWeb.web.url) - R.id.action_share -> { - val intent = Intent(Intent.ACTION_SEND) - intent.type = "text/plain" - intent.putExtra(Intent.EXTRA_TEXT, frostWeb.web.url) - startActivity(Intent.createChooser(intent, string(R.string.share))) - } + R.id.action_share -> shareText(frostWeb.web.url) else -> return super.onOptionsItemSelected(item) } return true |