refactor: convert AttachmentController.java to .kt#11111
Conversation
|
✅ Validation Passed: All report and feature-flag labels are correctly set. |
|
@rafaeltonholo, how can I test this class? Could you point to anything similar in the codebase? |
What do you mean by "how can I test this class"? Are you asking about building unit tests or testing it within the app? If you want to test it in the app, you should verify that all the functionalities related to attachments in the MessageViewFragment are still working as intended. While having a unit test for this class would be beneficial, during a conversion from Java to Kotlin, you are not required to introduce any new code. The focus of the task is solely on the conversion itself. Please refer to our documentation "Java to Kotlin Conversion Guide" to understand the required steps for performing this task. |
rafaeltonholo
left a comment
There was a problem hiding this comment.
Thanks for working on this conversion! There are a few things we need to address before merging this code.
Please check the Java to Kotlin Conversion Guide to verify what is needed during a Java to Kotlin conversion
048e9e4 to
5184d3d
Compare
Yes. I meant a unit test. I can send a separate PR for that after this. |
rafaeltonholo
left a comment
There was a problem hiding this comment.
You just missed one hardcoded dispatcher. Everything else is good
| } | ||
|
|
||
| private suspend fun viewLocalAttachment() { | ||
| val intent = withContext(Dispatchers.IO) { getBestViewIntent() } |
There was a problem hiding this comment.
Use ioDispatcher instead.
| val intent = withContext(Dispatchers.IO) { getBestViewIntent() } | |
| val intent = withContext(ioDispatcher) { getBestViewIntent() } |
ebb33de to
20410a8
Compare
20410a8 to
3e0bc1f
Compare
Fixes #11096