chore: [ANDROSDK-2326] migrate Note, CustomIcon and FileResource to kotlin#2641
Merged
Conversation
vgarciabnz
reviewed
Jun 17, 2026
| try { | ||
| val generatedUid = UidGeneratorImpl().generate() | ||
| val dstFile = saveFile(o, generatedUid, context) | ||
| val fileResource = transformer.transform(dstFile).toBuilder().uid(generatedUid).name(o.name).build() |
Member
There was a problem hiding this comment.
The generatedUid could be removed because it is assigned in the transformer, isn't it?
8ece865 to
1085fa0
Compare
andresmr
reviewed
Jun 18, 2026
| private suspend fun deleteFileResources(fileResources: List<FileResource>) { | ||
| fileResources.forEach { fileResource -> | ||
| fileResource.uid()?.let { uid -> | ||
| fileResource.uid.let { uid -> |
Contributor
There was a problem hiding this comment.
uid can't no longer be null, right?. If so, wouldn't be better remove the let for clarity?, something like:
fileResourceStore.deleteIfExists(fileResource.uid) fileResource.path()?.let { path -> deleteFile(path) }
|
vgarciabnz
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Migrates the
Note,NoteCreateProjection,CustomIconandFileResourcedomain models from Java AutoValue to Kotlin data classes using the@ModelBuilderannotation, continuing the ongoing model-to-Kotlin migration (batch 11). No user-visible behavior change.For
FileResource,uidis kept non-null (it is the database primary key), while the remaining fields stay nullable to preserve the previous AutoValue contract.FileResourceStorageStatuswas made public because a public Kotlin data class cannot expose aninternaltype through its generated constructor/copy(); the public API dump was regenerated accordingly.Related task: ANDROSDK-2326