Closed realityexpander closed 1 year ago
Just one thing that isn't clear to me in that block is why
getDateForSelectedDateIndex()
is needed. IfagendaRepository.getAgendaForDayFlow()
takes in a date, why can't you just pass_currentDate
? Not sure ifcurrentDate
reflects the current or selected date for you. If it reflects the current one, it doesn't seem to be needed as a state, since you can always get that usingLocalDate.now()
Because I have a "anchor" date that is the start of the week for the agendaScreen, then I have a selector that sets the "index day". This makes handling the UI very straightforward.
yesterday
,today
andtomorrow
Question 1
Is this a good way to handle combining two flows?
https://github.com/realityexpander/Tasky/blob/39dabd036e19bc9b7250332e66e390f6822c4761/app/src/main/java/com/realityexpander/tasky/agenda_feature/presentation/agenda_screen/AgendaViewModel.kt#L49-L57