Closed lukstbit closed 4 years ago
@lukstbit There could be another way to show the sent notes pics and videos without keeping the files which could mean a lot of used storage :/ For the files that are successfully sent to the server, on the reply to the POST action, we receive the urls for the files. Maybe we could save them locally and load those if the file is no longer in local storage? If there is an internet connection, if not, show only the note text + a snackbar that no internet is available or a message instead of the picture. What do you think?
What do you think?
Sounds great, I implemented this. I think the implementation is pretty ok and you can review it if you have time.
@lukstbit looking good! :rocket:
Just a few more layout adjustments to be made:
forms no - question no
text should look the same as the date textAlso, I noticed a weird small glitch: the forms no - question no
value sometimes disappears, I think it does so after syncing notes with the server.
I implemented the requested UI changes.
Also, I noticed a weird small glitch: the forms no - question no value sometimes disappears, I think it does so after syncing notes with the server.
I wasn't unable to reproduce this. However, while testing, I did notice a bug that prevented the NoteFragment and NoteFragmentDetails to show the correct question code(you can see the bug by going to forms -> selecting a form -> select a question(remember its code) -> swipe left/right to another question -> go to Add Note and add a note -> see that in the notes list the added note shows the code of the initial selected question and not the code of question the user swiped to). If you still see the bug you mentioned please let me know so I can take another look.
hey @lukstbit it seems to crash now if there are no notes stored:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ro.code4.monitorizarevot, PID: 31493
java.lang.IllegalStateException: Parcels.unwrap<Question>…able(Constants.QUESTION)) must not be null
at ro.code4.monitorizarevot.ui.notes.NoteFragment.onViewCreated(NoteFragment.kt:82)
hey @lukstbit it seems to crash now if there are no notes stored:
I apologize for that, I added tens of notes from the questions list for testing and never once crossed my mind to add it from the option in the forms list. I should be fixed now.
At the moment the form/question codes string is built on the spot so they will not appear in the list show when you add notes from the forms list. If you want them to appear there as well I can store them in the database so they will be available everywhere.
At the moment the form/question codes string is built on the spot so they will not appear in the list show when you add notes from the forms list. If you want them to appear there as well I can store them in the database so they will be available everywhere.
@lukstbit It would be awesome if we could show them everywhere! As it's clearer for the users what they filled in :) But it is not as urgent, so we could make a new issue for this if you do not have time now.
And just one more small nitpick for this issue, could you also make the forms text the same style as the date text here:
Thank you!! :rocket:
@aniri I implemented all of the requested changes, check it out!
Please retry analysis of this Pull-Request directly on SonarCloud.
What does it fix?
Closes #86
Implements all the features from the linked issue. Some notes about the implementation:
I'm keeping it as draft to correct issues that I missed and get feedback.
How has it been tested?
Manually, tested it for various situations(only images, images and video, only videos etc)