Conversation
| override fun equals(other: Any?): Boolean { | ||
| if (this === other) return true | ||
| if (other == null || this::class != other::class) return false | ||
|
|
||
| other as ProfileImage | ||
|
|
||
| return bytes.contentEquals(other.bytes) | ||
| } | ||
|
|
||
| override fun hashCode(): Int { | ||
| return bytes.contentHashCode() | ||
| } |
There was a problem hiding this comment.
It is necessary to resolve the warning.
|
|
||
| @Composable | ||
| internal fun cropImageScreenPresenter( | ||
| onConfirm: () -> Unit, |
There was a problem hiding this comment.
It seems there are no arguments like this in other screens, but I added it because I wanted to transition after event processing.
(Is there another way to achieve this?)
There was a problem hiding this comment.
Thank you for asking this. I recommend using this pattern.
| withContext(Dispatchers.Default) { | ||
| croppedProfileImage = requireNotNull(profileImageCandidate).crop(event.rect) | ||
| } |
There was a problem hiding this comment.
Because it can take time to process
This dispatcher might need to be injected...
| val cardUiState: ProfileCardUiState.Card? by rememberUpdatedState(profileCard.toCardUiState()) | ||
| var cardError by remember { mutableStateOf(ProfileCardError()) } | ||
| var uiType: ProfileCardUiType by remember { mutableStateOf(ProfileCardUiType.Loading) } | ||
| var uiType: ProfileCardUiType by rememberSaveable { mutableStateOf(ProfileCardUiType.Loading) } |
There was a problem hiding this comment.
To maintain the editing state when backing from CropImageScreen
| val strokeOuterColor = MaterialTheme.colorScheme.onSurface | ||
| val strokeInnerColor = MaterialTheme.colorScheme.surface |
There was a problem hiding this comment.
To ensure the border is not difficult to see if there are images with similar colors to surface/onSurface
|
@warahiko |
|
@takahirom
|
|
|
||
| @OptIn(ExperimentalMaterial3Api::class) | ||
| @Composable | ||
| internal fun CropImageScreen( |
There was a problem hiding this comment.
It is vital to test this method as we don't want to rely on manual testing. Could you try creating it? I think it is sufficient to check the launch for the first time.
9b0728c to
e22abae
Compare
|
Snapshot diff report
|
Thank you for sharing this. I also tried to solve the problem, but we haven't been able to resolve it so far. Although I mentioned creating a test, I think we might not have enough time to ship this by the DroidKaigi. 😭 We might have to solve the problem first |

Issue
#413
Overview (Required)
Links
Screenshot (Optional if screenshot test is present or unrelated to UI)
see videos
Movie (Optional)
android_before.mp4
android.mp4
for various images
various_images.mp4
in landscape screen
landscape.mp4
cropping in iOS (currently unavailable due to the above issue)
iOS_crop.mp4