mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
update firebase, update quartz, fix crash when getting nip number
This commit is contained in:
@@ -127,14 +127,18 @@ class SignerProvider : ContentProvider() {
|
|||||||
)
|
)
|
||||||
if (permission == null) {
|
if (permission == null) {
|
||||||
event.kind.kindToNip()?.let {
|
event.kind.kindToNip()?.let {
|
||||||
permission =
|
val nipNumber = it.toIntOrNull()
|
||||||
|
permission = if (nipNumber == null) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
database
|
database
|
||||||
.applicationDao()
|
.applicationDao()
|
||||||
.getPermission(
|
.getPermission(
|
||||||
sortOrder ?: packageName,
|
sortOrder ?: packageName,
|
||||||
"NIP",
|
"NIP",
|
||||||
it.toInt(),
|
nipNumber,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val signPolicy = database.applicationDao().getSignPolicy(sortOrder ?: packageName)
|
val signPolicy = database.applicationDao().getSignPolicy(sortOrder ?: packageName)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun consume(event: GiftWrapEvent) {
|
fun consume(event: GiftWrapEvent) {
|
||||||
if (!notificationManager().areNotificationsEnabled()) return
|
if (!notificationManager().areNotificationsEnabled()) return
|
||||||
|
|
||||||
// PushNotification Wraps don't include a receiver.
|
// PushNotification Wraps don't include a receiver.
|
||||||
@@ -85,7 +85,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
|
|||||||
pushWrappedEvent: GiftWrapEvent,
|
pushWrappedEvent: GiftWrapEvent,
|
||||||
account: Account,
|
account: Account,
|
||||||
) {
|
) {
|
||||||
pushWrappedEvent.cachedGift(account.signer) { notificationEvent ->
|
pushWrappedEvent.unwrap(account.signer) { notificationEvent ->
|
||||||
unwrapAndConsume(notificationEvent, account) { innerEvent ->
|
unwrapAndConsume(notificationEvent, account) { innerEvent ->
|
||||||
if (innerEvent.kind == 24133) {
|
if (innerEvent.kind == 24133) {
|
||||||
notify(innerEvent, account)
|
notify(innerEvent, account)
|
||||||
@@ -101,10 +101,10 @@ class EventNotificationConsumer(private val applicationContext: Context) {
|
|||||||
) {
|
) {
|
||||||
when (event) {
|
when (event) {
|
||||||
is GiftWrapEvent -> {
|
is GiftWrapEvent -> {
|
||||||
event.cachedGift(account.signer) { unwrapAndConsume(it, account, onReady) }
|
event.unwrap(account.signer) { unwrapAndConsume(it, account, onReady) }
|
||||||
}
|
}
|
||||||
is SealedGossipEvent -> {
|
is SealedGossipEvent -> {
|
||||||
event.cachedGossip(account.signer) {
|
event.unseal(account.signer) {
|
||||||
onReady(it)
|
onReady(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ core = "3.5.3"
|
|||||||
coreKtx = "1.13.1"
|
coreKtx = "1.13.1"
|
||||||
coreSplashscreen = "1.0.1"
|
coreSplashscreen = "1.0.1"
|
||||||
espressoCore = "3.6.1"
|
espressoCore = "3.6.1"
|
||||||
firebaseBom = "33.1.2"
|
firebaseBom = "33.2.0"
|
||||||
firebaseMessaging = "24.0.0"
|
firebaseMessaging = "24.0.1"
|
||||||
jna = "5.14.0"
|
jna = "5.14.0"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.2.1"
|
junitVersion = "1.2.1"
|
||||||
@@ -17,7 +17,7 @@ lifecycle_version = "2.8.4"
|
|||||||
material3 = "1.2.1"
|
material3 = "1.2.1"
|
||||||
mockk = "1.13.12"
|
mockk = "1.13.12"
|
||||||
nav_version = "2.7.7"
|
nav_version = "2.7.7"
|
||||||
quartz = "0.89.9"
|
quartz = "0.90.3"
|
||||||
compose_ui = "1.6.8"
|
compose_ui = "1.6.8"
|
||||||
richtextUi = "077a2cde64"
|
richtextUi = "077a2cde64"
|
||||||
roomKtx = "2.6.1"
|
roomKtx = "2.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user