Skip to content

Commit

Permalink
fix: sortTask is not loading properly
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal2376 committed Apr 11, 2024
1 parent 48f1595 commit b76e0ec
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ class TaskViewModel @Inject constructor(private val repository: TaskRepository)
appState = appState.copy(calenderView = CalenderView.entries[it])
}
}

viewModelScope.launch {
settingsStore.sortTaskKey.collect {
appState = appState.copy(sortBy = SortTask.entries[it])
}
}

viewModelScope.launch {
settingsStore.lastOpenedKey.collect { lastDateString ->
if (lastDateString == "") {
Expand All @@ -371,12 +376,6 @@ class TaskViewModel @Inject constructor(private val repository: TaskRepository)
}
}
}

viewModelScope.launch {
settingsStore.sortTaskKey.collect {
appState = appState.copy(sortBy = SortTask.entries[it])
}
}
}

//load build version
Expand Down

0 comments on commit b76e0ec

Please sign in to comment.