From a4e9eb442797d70d9285600e5ba91f3eb2f21997 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 29 Sep 2019 02:00:41 -0700 Subject: Show notification context in summary notification --- .../main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt | 3 +-- app/src/main/play/en-US/whatsnew | 1 + app/src/main/res/xml/frost_changelog.xml | 2 ++ docs/Changelog.md | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) 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) diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 02fdef9b..1d9aa95c 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -4,3 +4,4 @@ v2.4.1 * Notification tab will keep first page in the same window; fixes marking notifications as read * Fix nav and status bar icon colors for custom themes (Android O+) * Fix biometric prompt, and prompt on activity resume +* Fix notification title \ No newline at end of file diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml index 88216d63..3ee627ba 100644 --- a/app/src/main/res/xml/frost_changelog.xml +++ b/app/src/main/res/xml/frost_changelog.xml @@ -11,6 +11,8 @@ + + diff --git a/docs/Changelog.md b/docs/Changelog.md index 30820aa0..5c47c8fa 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,6 +5,7 @@ * Notification tab will keep first page in the same window; fixes marking notifications as read * Fix nav and status bar icon colors for custom themes (Android O+) * Fix biometric prompt, and prompt on activity resume +* Fix notification title ## v2.4.0 * Removed request services, which potentially caused phishing warnings. -- cgit v1.2.3 From 8b6daa04fcf0541977defa91b3b624713f831123 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 29 Sep 2019 02:12:35 -0700 Subject: Add option to open overlay links in browser --- .../com/pitchedapps/frost/activities/WebOverlayActivity.kt | 14 +++++--------- app/src/main/play/en-US/whatsnew | 3 ++- app/src/main/res/menu/menu_web.xml | 11 +++++++---- app/src/main/res/values/strings_web_context.xml | 1 + app/src/main/res/xml/frost_changelog.xml | 2 +- docs/Changelog.md | 1 + 6 files changed, 17 insertions(+), 15 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/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 1d9aa95c..6f1d0b36 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -4,4 +4,5 @@ v2.4.1 * Notification tab will keep first page in the same window; fixes marking notifications as read * Fix nav and status bar icon colors for custom themes (Android O+) * Fix biometric prompt, and prompt on activity resume -* Fix notification title \ No newline at end of file +* Fix notification title +* Add option to open overlay links in browser \ No newline at end of file diff --git a/app/src/main/res/menu/menu_web.xml b/app/src/main/res/menu/menu_web.xml index 5baefa1b..15394c75 100644 --- a/app/src/main/res/menu/menu_web.xml +++ b/app/src/main/res/menu/menu_web.xml @@ -5,14 +5,17 @@ + app:showAsAction="never" /> + app:showAsAction="never" /> + + diff --git a/app/src/main/res/values/strings_web_context.xml b/app/src/main/res/values/strings_web_context.xml index 2a8ca71c..fe3972cb 100644 --- a/app/src/main/res/values/strings_web_context.xml +++ b/app/src/main/res/values/strings_web_context.xml @@ -11,4 +11,5 @@ Copy Link Copy Text Frost for Facebook: Image Link Debug + Open in browser \ No newline at end of file diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml index 3ee627ba..4cf51cb0 100644 --- a/app/src/main/res/xml/frost_changelog.xml +++ b/app/src/main/res/xml/frost_changelog.xml @@ -12,7 +12,7 @@ - + diff --git a/docs/Changelog.md b/docs/Changelog.md index 5c47c8fa..673f2e22 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,6 +6,7 @@ * Fix nav and status bar icon colors for custom themes (Android O+) * Fix biometric prompt, and prompt on activity resume * Fix notification title +* Add option to open overlay links in browser ## v2.4.0 * Removed request services, which potentially caused phishing warnings. -- cgit v1.2.3 From 9021295afa84ebd4839027f56d4c594f3b8cd0da Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 29 Sep 2019 02:19:08 -0700 Subject: Remove jackson dependency --- app/build.gradle | 2 -- app/proguard-rules.pro | 9 --------- app/src/main/play/en-US/whatsnew | 2 +- buildSrc/src/main/kotlin/Versions.kt | 2 -- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 745a1559..ee8cf5d3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -269,8 +269,6 @@ dependencies { //noinspection GradleDependency kapt kau.Dependencies.glideKapt - implementation "com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}" - //noinspection GradleDependency releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}" //noinspection GradleDependency diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index cdb57300..bd716244 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -21,15 +21,6 @@ **[] $VALUES; public *; } -# Jackson --keep @com.fasterxml.jackson.annotation.JsonIgnoreProperties class * { *; } --keep @com.fasterxml.jackson.annotation.JsonCreator class * { *; } --keep @com.fasterxml.jackson.annotation.JsonValue class * { *; } --keep class com.fasterxml.** { *; } --keepnames class com.fasterxml.jackson.** { *; } --keepclassmembers public final enum com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility { - public static final com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility *; -} # Kotlin coroutines -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {} -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {} diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 02fdef9b..2c68cc55 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -3,4 +3,4 @@ v2.4.1 * Add better support for mobile url conversions * Notification tab will keep first page in the same window; fixes marking notifications as read * Fix nav and status bar icon colors for custom themes (Android O+) -* Fix biometric prompt, and prompt on activity resume +* Fix biometric prompt, and prompt on activity resume \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 1e0d972e..9ddde207 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -16,8 +16,6 @@ object Versions { // https://mvnrepository.com/artifact/androidx.core/core-ktx?repo=google const val ktx = "1.1.0" - // https://github.com/FasterXML/jackson-core/releases - const val jackson = "2.9.8" // https://github.com/jhy/jsoup/releases const val jsoup = "1.11.3" // https://github.com/square/leakcanary/releases -- cgit v1.2.3