Skip to content

refactor: convert Attachment class to Kotlin#10482

Open
mohitsatr wants to merge 2 commits intothunderbird:mainfrom
mohitsatr:attachment-to-kt
Open

refactor: convert Attachment class to Kotlin#10482
mohitsatr wants to merge 2 commits intothunderbird:mainfrom
mohitsatr:attachment-to-kt

Conversation

@mohitsatr
Copy link

Related #9277

Related changes:

  • Replace direct field access with getters in MessageCompose.java, AttachmentPresenter.java, AttachmentInfoLoader.java, and AttachmentContentLoader.java

@mohitsatr
Copy link
Author

I just noticed PR's title format should be like that of the commit - Refactor: convert ..., but I'm not able to change the title now. I'll keep that in mind from now on.

*/
@Suppress("LongParameterList")
class Attachment(
val uri: Uri,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
val uri: Uri,
@JvmField
val uri: Uri,

You can mark these properties as @JvmField to get rid of attachment.getUri() changes in Java code.

Copy link
Author

Choose a reason for hiding this comment

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

Done for uri, loaderId, and allowMessageType. @JvmField only works for non overriden property.

I think it's not an issue. I will convert these other java files into kotlin after this one

@wmontwe wmontwe changed the title Convert Attachment class to kotlin refactor: convert Attachment class to kotlin Feb 9, 2026
@wmontwe wmontwe changed the title refactor: convert Attachment class to kotlin refactor: convert Attachment class to Kotlin Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants