talk-android
talk-android copied to clipboard
Fix message delay on send and delete
- fixes #3744
Note to Self: Weird, for some reason the
onloadMore
function is getting triggered when it shouldn't. Page > 1 when the user hasn't even scrolled. Since the function triggers a refresh withlookIntoFuture = false
, it might be messing up the occasional chat update. Need to debug the state oflookIntoFuture
on every call to make sure.If the function is unreliable, I might have to implement my own scroll listener. But first I should study the source code at ChatKit to see if my code is what's causing the error, or if's something on their end.
Why is it sending the number of messages with the onLoadMore call? currentPage
is ignored.
int visibleThreshold = 5;
if (!loading && (lastVisibleItemPosition + visibleThreshold) > totalItemCount) {
currentPage++;
loadMoreListener.onLoadMore(loadMoreListener.getMessagesCount(), totalItemCount);
loading = true;
}
Ok the message is being sent, but it's returning a 304 instead of a 200, so it's not be processed. Need to fix that.
🚧 TODO
- [x] fix message send delay
- [ ] Fix message delete delay
- [x] Fix xml layout error on smaller screens
🏁 Checklist
- [ ] ⛑️ Tests (unit and/or integration) are included or not needed
- [ ] 🔖 Capability is checked or not needed
- [ ] 🔙 Backport requests are created or not needed:
/backport to stable-xx.x
- [ ] 📅 Milestone is set
- [ ] 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)
/backport to stable-19.0
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3746-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!