We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4982d50 commit c7425eeCopy full SHA for c7425ee
app/src/main/java/to/bitkit/fcm/WakeNodeWorker.kt
@@ -239,7 +239,14 @@ class WakeNodeWorker @AssistedInject constructor(
239
}
240
241
private suspend fun deliver() {
242
- lightningRepo.stop()
+ // Only stop node if app is not in foreground
243
+ // LightningNodeService will keep node running in background when notifications are enabled
244
+ if (App.currentActivity?.value == null) {
245
+ Logger.debug("App in background, stopping node after notification delivery", context = TAG)
246
+ lightningRepo.stop()
247
+ } else {
248
+ Logger.debug("App in foreground, keeping node running", context = TAG)
249
+ }
250
251
bestAttemptContent?.run {
252
appContext.pushNotification(title, body)
0 commit comments