Closed lukstbit closed 4 years ago
@lukstbit woooh, looks good! could you also add the possibility of selecting more than one item when loading files from gallery?
The user can now select one file/multiple files from the gallery in one go!
There is also one extra commit where I refactored the error messages shown to the user when copying the file fails. The previous error messages were about storage permission missing but that will happen quite rarely because we check for the permission every time the user sets to select a file/take picture. A more common error would be insufficient storage and I changed the messages to reflect this. If you don't like the change you could remove the last commit.
Also, one thing that I forgot to mention in the initial post is that the number of files that could be attached is unlimited, the user has the possibility of adding a lot of file with one note. I don't know if this is desired or if there should be a hard limit on the number of files attached to a single note.
@lukstbit looks great, thanks! you are right, we'll check if there are any file restrictions on the backend and get back on this with another issue ;)
btw...are you on the code4ro slack? :smiley:
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and 0 Security Hotspots to review)
0 Code Smells
No Coverage information
0.0% Duplication
@aniri I'm not on code4ro I don't even have a Slack account :)
@lukstbit would you like to join us on slack as well? :D We can send you an email invite :D
No, not at this moment. I do plan to implement all the issues currently labeled code4ro-hackdays :)
No, not at this moment. I do plan to implement all the issues currently labeled code4ro-hackdays :)
@lukstbit awesome! thanks a lot!! we'll have so many new features ready for the elections this december :smiley:
What does it fix?
Closes #28
To allow the user to add multiple files to a note I kept the add media button always visible. To keep the changes to a minimum I reused the old logic, so instead of the string in the Note class referencing a single path it will represent a concatenation of all the paths to be uploaded with the note. The repository can then extract the paths and make the backend request.
How has it been tested?
I tested the changes manually on various API levels. I plan to add some tests at a later point after some code refactoring.