talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

Fix message delay on send and delete

Open rapterjet2004 opened this issue 11 months ago • 2 comments

  • 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 with lookIntoFuture = false, it might be messing up the occasional chat update. Need to debug the state of lookIntoFuture 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?)

rapterjet2004 avatar Mar 21 '24 18:03 rapterjet2004

/backport to stable-19.0

rapterjet2004 avatar Mar 29 '24 13:03 rapterjet2004

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3746-talk.apk

qrcode

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.

github-actions[bot] avatar Apr 03 '24 14:04 github-actions[bot]

Codacy

Lint

TypemasterPR
Warnings8181
Errors1010

SpotBugs

CategoryBaseNew
Bad practice66
Correctness88
Dodgy code110110
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total137137

github-actions[bot] avatar Apr 03 '24 14:04 github-actions[bot]

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!

github-actions[bot] avatar Apr 05 '24 02:04 github-actions[bot]