Closed theo-damiani closed 3 years ago
Make changes in the view:
The add task button no longer works. I will investigate this error. But I think the pattern is well defined and you can get an idea to implement in the same way for the list selection view.
Also need to add tests.
Hey!
So I think the model is now good. From the previous push, I fixed the Live Data updating. So it solved issue #44: I just need to take a look at the task class (adding a done field). Also, the item view is fully adapted to the MVVM pattern #72. Just to explain some details:
I think we can maybe use this pattern for the list selection view, this concerns issues #71, #32.
Other things to note:
UUID id
in the Todo Repository to recover which todo list we are displaying in the item view as for now the list selection view doesn't give any info on which todo is selected.I need to clean the code, remove the print (used to debug), modular some parts (CodeClimate complain of some too long function), and of course implement tests.
Cheers!
Hey everyone!
This is not really a pull request. I just wanted to push it and create the pull request to explain some details.
I tried to define the MVVM model for the ItemViewActivity:
ItemViewActivityViewModel
(maybe a too long name): it uses mutable live data. When the itemView activity is launched the model view will load the to-do list from the database (for now it is just a new to-do list). And performs any updates that the view sends to the model.I am not really sure about all this stuff but from what the TA said this morning and my research after our meeting, it seems to be a good start with this new 'architecture'. And so Noah and Leandro get a first draft for their related task #71 and #69.
If you have any suggestions or anything, don't hesitate. I never used this stuff, so it is new to me.
Cheers!