File tree 1 file changed +3
-1
lines changed
presentation/src/main/java/xyz/aprildown/timer/presentation/timer
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import androidx.lifecycle.LiveData
5
5
import androidx.lifecycle.MutableLiveData
6
6
import androidx.lifecycle.asFlow
7
7
import androidx.lifecycle.asLiveData
8
+ import androidx.lifecycle.distinctUntilChanged
8
9
import androidx.lifecycle.switchMap
9
10
import androidx.lifecycle.viewModelScope
10
11
import com.github.deweyreed.tools.arch.Event
@@ -90,7 +91,8 @@ class TimerViewModel @Inject constructor(
90
91
private val _shareStringEvent = MutableLiveData <Event <Fruit <String >>>()
91
92
val shareStringEvent: LiveData <Event <Fruit <String >>> = _shareStringEvent
92
93
93
- val tips: LiveData <Int > = tipManager.getTipFlow(this ).asLiveData()
94
+ val tips: LiveData <Int > = tipManager.getTipFlow(this )
95
+ .asLiveData().distinctUntilChanged()
94
96
95
97
init {
96
98
launch {
You can’t perform that action at this time.
0 commit comments