Skip to content

Commit

Permalink
Fix start servuce
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Nov 6, 2024
1 parent 09b040b commit deff7c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/com/koalasat/pokey/models/NostrClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ object NostrClient {
private fun getInboxLists(context: Context) {
val hexKey = Pokey.getInstance().getHexKey()
if (hexKey.isEmpty()) return
Log.d("Pokey", "getInboxLists")

Client.sendFilterAndStopOnFirstResponse(
subscriptionReadId,
Expand Down Expand Up @@ -267,7 +266,6 @@ object NostrClient {
}

private fun manageInboxRelays(context: Context, event: Event) {
Log.d("Pokey", event.kind.toString())
val db = AppDatabase.getDatabase(context, Pokey.getInstance().getHexKey())
val lastCreatedRelayAt = db.applicationDao().getLatestRelaysByKind(event.kind)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ class NotificationsService : Service() {
startForeground(1, createNotification())
keepAlive()

startSubscription()

val connectivityManager =
(getSystemService(ConnectivityManager::class.java) as ConnectivityManager)
connectivityManager.registerDefaultNetworkCallback(networkCallback)
Expand Down Expand Up @@ -213,7 +215,7 @@ class NotificationsService : Service() {
NostrClient.checkRelaysHealth(this@NotificationsService)
}
},
3000,
5000,
61000,
)
}
Expand Down

0 comments on commit deff7c0

Please sign in to comment.