talk-android
talk-android copied to clipboard
Added a ProgressBar to display while uploading Pics/Files
Resolves #2500
Overview
This pull request introduces a ProgressBar to enhance the user experience during file uploads. The ProgressBar provides visual feedback on the upload progress, making it more intuitive for users.
Changes Made:
Upload Functionality:
- Modified the upload function to handle ProgressBar visibility.
- The ProgressBar is set to VISIBLE during the upload process and GONE when the upload is complete.
WorkManager Integration:
- Utilized WorkManager for managing the background file upload task.
- Enqueued unique work to ensure proper handling of the upload task.
Observing WorkManager State:
- Implemented an observer for the WorkManager to track the state of the file upload.
- The ProgressBar is hidden once the upload is completed, and appropriate notifications are displayed.
🏁 Checklist
- [x] ⛑️ Tests (unit and/or integration) are included or not needed
- [x] 🔖 Capability is checked or not needed
- [x] 🔙 Backport requests are created or not needed:
/backport to stable-xx.x
- [x] 📅 Milestone is set
- [x] 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)
Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml.
We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server.
This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.
Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml.
We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server.
This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.
what would be better @mahibi @rapterjet2004 ? use the existing shimmer which appears while loading the chat or a custom shimmer for uploading ?
Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml. We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server. This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.
what would be better @mahibi @rapterjet2004 ? use the existing shimmer which appears while loading the chat or a custom shimmer for uploading ?
i would say a loading circle (spinner) inside a placeholder message.
Fyi i rebased on master and fixed minor merge conflicts
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3443-talk.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.
Codacy
Lint
Type | master | PR |
Warnings | 81 | 81 |
Errors | 10 | 10 |
SpotBugs
Category | Base | New |
---|---|---|
Bad practice | 6 | 6 |
Correctness | 8 | 8 |
Dodgy code | 110 | 110 |
Internationalization | 3 | 3 |
Malicious code vulnerability | 3 | 3 |
Performance | 6 | 6 |
Security | 1 | 1 |
Total | 137 | 137 |
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!