Skip to content

Commit

Permalink
Better definition of avatarMediatorLiveData
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBourdin88 committed Jul 2, 2024
1 parent fefe750 commit d3ee2d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/infomaniak/mail/views/AvatarView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class AvatarView @JvmOverloads constructor(
private val state = State()

// We use waitInitMediator over MediatorLiveData because we know both live data will be initialized very quickly anyway
private val avatarMediatorLiveData =
private val avatarMediatorLiveData: MutableLiveData<Pair<MergedContactDictionary, Boolean>> =
if (isInEditMode) {
MutableLiveData<Pair<MergedContactDictionary, Boolean>>(null)
MutableLiveData()
} else {
Utils.waitInitMediator(
avatarMergedContactData.mergedContactLiveData,
Expand Down

0 comments on commit d3ee2d2

Please sign in to comment.