Commit ca86c821 authored by Sebastian Kaspari's avatar Sebastian Kaspari
Browse files

Update GeckoView Nightly to 82.0.20200826032437.

parent a64c6849
...@@ -6,7 +6,7 @@ internal object GeckoVersions { ...@@ -6,7 +6,7 @@ internal object GeckoVersions {
/** /**
* GeckoView Nightly Version. * GeckoView Nightly Version.
*/ */
const val nightly_version = "81.0.20200824094458" const val nightly_version = "82.0.20200826032437"
/** /**
* GeckoView Beta Version. * GeckoView Beta Version.
......
...@@ -22,7 +22,7 @@ data class WebNotification( ...@@ -22,7 +22,7 @@ data class WebNotification(
val title: String?, val title: String?,
val tag: String, val tag: String,
val body: String?, val body: String?,
val sourceUrl: String, val sourceUrl: String?,
val iconUrl: String?, val iconUrl: String?,
val direction: String?, val direction: String?,
val lang: String?, val lang: String?,
......
...@@ -58,12 +58,15 @@ internal class NativeNotificationBridge( ...@@ -58,12 +58,15 @@ internal class NativeNotificationBridge(
} }
builder.setSmallIcon(smallIcon) builder.setSmallIcon(smallIcon)
.setSubText(sourceUrl.tryGetHostFromUrl())
.setContentTitle(title) .setContentTitle(title)
.setShowWhen(true) .setShowWhen(true)
.setWhen(timestamp) .setWhen(timestamp)
.setAutoCancel(true) .setAutoCancel(true)
sourceUrl?.let {
builder.setSubText(it.tryGetHostFromUrl())
}
body?.let { body?.let {
builder.setContentText(body) builder.setContentText(body)
.setStyle(Notification.BigTextStyle().bigText(body)) .setStyle(Notification.BigTextStyle().bigText(body))
......
...@@ -72,7 +72,7 @@ class WebNotificationFeature( ...@@ -72,7 +72,7 @@ class WebNotificationFeature(
override fun onShowNotification(webNotification: WebNotification) { override fun onShowNotification(webNotification: WebNotification) {
CoroutineScope(coroutineContext).launch { CoroutineScope(coroutineContext).launch {
val origin = webNotification.sourceUrl.tryGetHostFromUrl() val origin = webNotification.sourceUrl?.tryGetHostFromUrl() ?: return@launch
val permissions = sitePermissionsStorage.findSitePermissionsBy(origin) ?: return@launch val permissions = sitePermissionsStorage.findSitePermissionsBy(origin) ?: return@launch
if (!permissions.notification.isAllowed()) { if (!permissions.notification.isAllowed()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment