Skip to content

Commit

Permalink
update firebase, update quartz, fix crash when getting nip number
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Aug 28, 2024
1 parent e219f9b commit 76f53e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,18 @@ class SignerProvider : ContentProvider() {
)
if (permission == null) {
event.kind.kindToNip()?.let {
permission =
val nipNumber = it.toIntOrNull()
permission = if (nipNumber == null) {
null
} else {
database
.applicationDao()
.getPermission(
sortOrder ?: packageName,
"NIP",
it.toInt(),
nipNumber,
)
}
}
}
val signPolicy = database.applicationDao().getSignPolicy(sortOrder ?: packageName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
}
}

suspend fun consume(event: GiftWrapEvent) {
fun consume(event: GiftWrapEvent) {
if (!notificationManager().areNotificationsEnabled()) return

// PushNotification Wraps don't include a receiver.
Expand All @@ -85,7 +85,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
pushWrappedEvent: GiftWrapEvent,
account: Account,
) {
pushWrappedEvent.cachedGift(account.signer) { notificationEvent ->
pushWrappedEvent.unwrap(account.signer) { notificationEvent ->
unwrapAndConsume(notificationEvent, account) { innerEvent ->
if (innerEvent.kind == 24133) {
notify(innerEvent, account)
Expand All @@ -101,10 +101,10 @@ class EventNotificationConsumer(private val applicationContext: Context) {
) {
when (event) {
is GiftWrapEvent -> {
event.cachedGift(account.signer) { unwrapAndConsume(it, account, onReady) }
event.unwrap(account.signer) { unwrapAndConsume(it, account, onReady) }
}
is SealedGossipEvent -> {
event.cachedGossip(account.signer) {
event.unseal(account.signer) {
onReady(it)
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ core = "3.5.3"
coreKtx = "1.13.1"
coreSplashscreen = "1.0.1"
espressoCore = "3.6.1"
firebaseBom = "33.1.2"
firebaseMessaging = "24.0.0"
firebaseBom = "33.2.0"
firebaseMessaging = "24.0.1"
jna = "5.14.0"
junit = "4.13.2"
junitVersion = "1.2.1"
lifecycle_version = "2.8.4"
material3 = "1.2.1"
mockk = "1.13.12"
nav_version = "2.7.7"
quartz = "0.89.9"
quartz = "0.90.3"
compose_ui = "1.6.8"
richtextUi = "077a2cde64"
roomKtx = "2.6.1"
Expand Down

0 comments on commit 76f53e9

Please sign in to comment.