google / google/ground-android

[Code health] Stop using LiveData for event streams

Open
#668 2 comments 0 reactions 0 assignees View on GitHub
type: code health
Dominant language
Kotlin
Stars
293
Forks
149
Avg merge
1d 16h
Merged PRs (30d)
42

Description

We currently use custom `Action` and `Event` classes as stateful wrappers to ensure events are not reemitted to views when restored. The reason the values are replayed is because we are using `LiveData` to model events in these cases instead of UI state. If we use `Obvserable`s backed by `PublishSubject` we won't have this issue.

@scolsen @shobhitagarwal1612 FYI.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.