File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
presentation/src/main/java/xyz/aprildown/timer/presentation/timer Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,13 @@ class RecordViewModel @Inject constructor(
62
62
getRecords.calculateTimeline(it)
63
63
}
64
64
65
- private val _minDateMilli = MutableLiveData <Long >()
65
+ private val _minDateMilli : MutableLiveData <Long > = MutableLiveData ()
66
66
val minDateMilli: LiveData <Long > = _minDateMilli
67
67
68
68
init {
69
69
launch {
70
- _minDateMilli .value = getRecords.getMinDateMilli()
70
+ val minDateMilli: Long = getRecords.getMinDateMilli()
71
+ _minDateMilli .value = minDateMilli
71
72
72
73
val all = mutableListOf<TimerInfo >()
73
74
val sortBy = folderSortByRule.get()
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class TimerViewModel @Inject constructor(
79
79
folders.find { it.id == id }
80
80
}.asLiveData()
81
81
82
- private val currentSortBy = MutableLiveData <FolderSortBy >()
82
+ private val currentSortBy: MutableLiveData <FolderSortBy > = MutableLiveData ()
83
83
84
84
val timerInfo: LiveData <List <TimerInfo >> =
85
85
currentFolderId.asFlow().combine(currentSortBy.asFlow()) { id, by ->
@@ -106,12 +106,14 @@ class TimerViewModel @Inject constructor(
106
106
} else {
107
107
FolderEntity .FOLDER_DEFAULT
108
108
}
109
- currentSortBy.value = folderSortByRule.get()
109
+ val folderSortBy: FolderSortBy = folderSortByRule.get()
110
+ currentSortBy.value = folderSortBy
110
111
}
111
112
}
112
113
113
114
private suspend fun refreshFolders () {
114
- _allFolders .value = getFolders.invoke()
115
+ val folders: List <FolderEntity > = getFolders()
116
+ _allFolders .value = folders
115
117
}
116
118
117
119
fun changeFolder (folderId : Long ) {
You can’t perform that action at this time.
0 commit comments