Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating Rxjava to coroutines #1 #4437

Merged
merged 6 commits into from
Nov 18, 2024
Merged

Migrating Rxjava to coroutines #1 #4437

merged 6 commits into from
Nov 18, 2024

Conversation

sowjanyakch
Copy link
Contributor

@sowjanyakch sowjanyakch commented Nov 12, 2024

Resolve #4410

🚧 TODO

  • ...

🏁 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?)

@sowjanyakch sowjanyakch marked this pull request as ready for review November 13, 2024 09:57
@sowjanyakch sowjanyakch changed the title Coroutine 1 Migrate setReadStatusPrivacy and setTypingStatusPrivacy to coroutines Nov 13, 2024
@sowjanyakch sowjanyakch changed the title Migrate setReadStatusPrivacy and setTypingStatusPrivacy to coroutines Migrating Rxjava to coroutines #1 Nov 13, 2024
@sowjanyakch sowjanyakch self-assigned this Nov 13, 2024
@sowjanyakch sowjanyakch added the 3. to review Waiting for reviews label Nov 13, 2024
@sowjanyakch sowjanyakch marked this pull request as draft November 13, 2024 10:39

override fun onError(e: Throwable) {
} catch (e: Exception) {
withContext(Dispatchers.Main) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not the scope of this PR (so should not be done in this PR) and it was already with RxJava:

When something goes wrong and the exception is thrown or onError was triggered, this will result in an endless loop as the preference is set and immediately triggers the readPrivacyFlow again.


override fun onError(e: Throwable) {
} catch (e: Exception) {
withContext(Dispatchers.Main) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same endless loop situation as with read privacy. Not to be solved in this PR

@mahibi mahibi marked this pull request as ready for review November 18, 2024 19:49
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
@mahibi mahibi added this to the 20.1.0 milestone Nov 18, 2024
@mahibi mahibi merged commit 7d09747 into master Nov 18, 2024
14 of 17 checks passed
@mahibi mahibi deleted the coroutine_1 branch November 18, 2024 20:00
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings94153
Errors13282

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1616
Dodgy code7474
Internationalization33
Malicious code vulnerability33
Performance55
Security11
Total108108

Lint increased!

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4437-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.

@mahibi
Copy link
Collaborator

mahibi commented Nov 26, 2024

/backport to stable-20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate some RxJava to coroutines #1
2 participants