Merge pull request #2675 from vitorpamplona/claude/prevent-lock-nest-screen-GKcSS

Keep screen on during active nest room connections
This commit is contained in:
Vitor Pamplona
2026-04-30 19:00:56 -04:00
committed by GitHub
@@ -32,6 +32,7 @@ import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.viewmodels.ConnectionUiState
import com.vitorpamplona.amethyst.commons.viewmodels.NestViewModel
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.event.observeNoteEvent
import com.vitorpamplona.amethyst.ui.call.KeepScreenOn
import com.vitorpamplona.amethyst.ui.note.LoadAddressableNote
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.nests.datasource.NestRoomFilterAssemblerSubscription
@@ -176,6 +177,12 @@ private fun NestActivityBody(
val ui by viewModel.uiState.collectAsState()
// Hold a screen-on lock while the user is actively in the room so the
// device doesn't lock and interrupt the audio session UI.
if (ui.connection is ConnectionUiState.Connected) {
KeepScreenOn()
}
// System bridges: PIP overlay actions + foreground service.
PipBridge(ui, pipMuteSignal, viewModel, onMuteState, onConnectedChange)
NestForegroundServiceLifecycle(ui)