Fix: make sure we ignore notifications for open rooms (#867)

* Make sure we ignore notifications for open rooms
- Listen to process lifecycle changes in `AppForegroundStateService`. Use initializers to reliable create it.
- Merge `AppNavigationState` with `AppForegroundState`. Renamed the previous `AppNavigationState` to `NavigationState`, created a new `AppNavigationState` which contains both the navigation state and the foreground state.
This commit is contained in:
Jorge Martin Espinosa 2023-07-17 17:02:06 +02:00 committed by GitHub
parent 004b86b05d
commit 9247cd765a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 552 additions and 246 deletions

View file

@ -32,7 +32,7 @@ import io.element.android.features.roomdetails.api.RoomDetailsEntryPoint
import io.element.android.libraries.architecture.childNode
import io.element.android.libraries.matrix.api.room.RoomMembershipObserver
import io.element.android.libraries.matrix.test.room.FakeMatrixRoom
import io.element.android.services.appnavstate.test.NoopAppNavigationStateService
import io.element.android.services.appnavstate.test.FakeAppNavigationStateService
import org.junit.Rule
import org.junit.Test
@ -82,7 +82,7 @@ class RoomFlowNodeTest {
plugins = plugins,
messagesEntryPoint = messagesEntryPoint,
roomDetailsEntryPoint = roomDetailsEntryPoint,
appNavigationStateService = NoopAppNavigationStateService(),
appNavigationStateService = FakeAppNavigationStateService(),
roomMembershipObserver = RoomMembershipObserver()
)