diff options
author | Allan Wang <me@allanwang.ca> | 2019-09-29 02:52:13 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-09-29 02:52:13 -0700 |
commit | a75176f963e1fed7e99389b84170da058072128f (patch) | |
tree | 5f063a0be2962ea96f4bd49088623841da46cd53 /app/src/main/kotlin | |
parent | 14573f9ac4cb9cfb799e1cd20d78202599d55e25 (diff) | |
parent | 8932e9f5eb9995729f674ebe02464a6f20f4d1ec (diff) | |
download | frost-a75176f963e1fed7e99389b84170da058072128f.tar.gz frost-a75176f963e1fed7e99389b84170da058072128f.tar.bz2 frost-a75176f963e1fed7e99389b84170da058072128f.zip |
Update changelog
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt | 14 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | 3 |
2 files changed, 6 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index 3a6af146..c3d77dc5 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -38,8 +38,8 @@ import ca.allanwang.kau.utils.dpToPx import ca.allanwang.kau.utils.finishSlideOut import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.navigationBarColor -import ca.allanwang.kau.utils.setMenuIcons import ca.allanwang.kau.utils.shareText +import ca.allanwang.kau.utils.startLink import ca.allanwang.kau.utils.statusBarColor import ca.allanwang.kau.utils.tint import ca.allanwang.kau.utils.toDrawable @@ -47,7 +47,6 @@ import ca.allanwang.kau.utils.toast import ca.allanwang.kau.utils.withAlpha import ca.allanwang.kau.utils.withMainContext import com.google.android.material.snackbar.BaseTransientBottomBar -import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.contracts.ActivityContract @@ -314,18 +313,15 @@ abstract class WebOverlayActivityBase(private val userAgent: String = USER_AGENT menuInflater.inflate(R.menu.menu_web, menu) overlayContext?.onMenuCreate(this, menu) toolbar.tint(Prefs.iconColor) - setMenuIcons( - menu, Prefs.iconColor, - R.id.action_share to CommunityMaterial.Icon2.cmd_share, - R.id.action_copy_link to GoogleMaterial.Icon.gmd_content_copy - ) return true } override fun onOptionsItemSelected(item: MenuItem): Boolean { + val url = web.currentUrl.formattedFbUrl when (item.itemId) { - R.id.action_copy_link -> copyToClipboard(web.currentUrl.formattedFbUrl) - R.id.action_share -> shareText(web.currentUrl.formattedFbUrl) + R.id.action_copy_link -> copyToClipboard(url) + R.id.action_share -> shareText(url) + R.id.action_open_in_browser -> startLink(url) else -> if (!OverlayContext.onOptionsItemSelected(web, item.itemId)) return super.onOptionsItemSelected(item) } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt index e4d0b485..955d6482 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt @@ -258,9 +258,8 @@ enum class NotificationType( * and will only show if we have at least 2 notifications */ private fun summaryNotification(context: Context, userId: Long, count: Int): FrostNotification { - val intent = Intent(context, FrostWebActivity::class.java) + val intent = createCommonIntent(context, userId) intent.data = Uri.parse(fbItem.url) - intent.putExtra(ARG_USER_ID, userId) val group = "${groupPrefix}_$userId" val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT) |