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(
6262 getRecords.calculateTimeline(it)
6363 }
6464
65- private val _minDateMilli = MutableLiveData <Long >()
65+ private val _minDateMilli : MutableLiveData <Long > = MutableLiveData ()
6666 val minDateMilli: LiveData <Long > = _minDateMilli
6767
6868 init {
6969 launch {
70- _minDateMilli .value = getRecords.getMinDateMilli()
70+ val minDateMilli: Long = getRecords.getMinDateMilli()
71+ _minDateMilli .value = minDateMilli
7172
7273 val all = mutableListOf<TimerInfo >()
7374 val sortBy = folderSortByRule.get()
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class TimerViewModel @Inject constructor(
7979 folders.find { it.id == id }
8080 }.asLiveData()
8181
82- private val currentSortBy = MutableLiveData <FolderSortBy >()
82+ private val currentSortBy: MutableLiveData <FolderSortBy > = MutableLiveData ()
8383
8484 val timerInfo: LiveData <List <TimerInfo >> =
8585 currentFolderId.asFlow().combine(currentSortBy.asFlow()) { id, by ->
@@ -106,12 +106,14 @@ class TimerViewModel @Inject constructor(
106106 } else {
107107 FolderEntity .FOLDER_DEFAULT
108108 }
109- currentSortBy.value = folderSortByRule.get()
109+ val folderSortBy: FolderSortBy = folderSortByRule.get()
110+ currentSortBy.value = folderSortBy
110111 }
111112 }
112113
113114 private suspend fun refreshFolders () {
114- _allFolders .value = getFolders.invoke()
115+ val folders: List <FolderEntity > = getFolders()
116+ _allFolders .value = folders
115117 }
116118
117119 fun changeFolder (folderId : Long ) {
You can’t perform that action at this time.
0 commit comments