steroid-team / app

Helping you organise your day with ease and privacy.
1 stars 2 forks source link

model: MVVM pattern & LiveData #76

Closed theo-damiani closed 3 years ago

theo-damiani commented 3 years ago

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:

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!

theo-damiani commented 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.

theo-damiani commented 3 years ago

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:

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!