Skip to content

Conversation

@jbsession
Copy link
Collaborator

This PR removes portrait lock.

This PR also adds some new composables for different orientations.

TODO: Full end to end testing for landscape.

@jbsession jbsession self-assigned this Sep 22, 2025
@damajor damajor mentioned this pull request Sep 29, 2025
modifier: Modifier = Modifier
) {
Column(
modifier = modifier.widthIn(max = 420.dp),
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use your smallMaximumImgClamp which maybe can be renamed to something more meaningful since it doesn't apply only to images, but to content. maxContentSizeSmall ? Which means the other ones would need to be renamed as well

@ThomasSession
Copy link
Collaborator

Some issues from the latest changes:

  • App crashes when going from landscape to portrait in the camera screen
  • Media rail is now disappeared when opening a set of images inside a conversation, in landscape

typeMask: Int = WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.ime(),
additionalInsets : Insets = Insets.NONE // for additional offsets
additionalInsets : Insets = Insets.NONE, // for additional offsets
applyTop: Boolean = true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like this is a bit applying a band aid on top of a band aid.
We already have a method for setting up insets but now we're adding flags to cancel the act we are setting ourselves.
I think the logic is breaking at a higher level.
Is the issue that we are applying a bottom padding to the FAB which then gets sets on the side? If so which should fix that logic rather than adding more patches to the existing function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. The issue is that insets are applied to the sides as well which was intended for this method. For this case, maybe adding a new helper is better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

But there are legitimate side insets to apply. They are used for back gestures, etc..
So we can't ask the system to help us with the displaycutout and then ignore it.
I think the issue is how this is built and how the values are taken into account in landscape vs in portrait.

Copy link
Collaborator Author

@jbsession jbsession Dec 1, 2025

Choose a reason for hiding this comment

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

Yup, I can revert this method. Maybe forcing this method for this Fab is not the right approach since it only ever wants the bottom inset. That was the reason I added such flags in the first place. I can then add a new helper to use for the case of this FAB, wdyt?

handleCameraImageCaptured(uri, size, width, height)
}
}else{
if(supportFragmentManager.backStackEntryCount == 0){
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this case covering? Why are we finishing the activity here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will avoid a black screen in the MediaSendActivity finish it for when we press back to "undo" a photo, and then pressing cancelling the CameraActivity.

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.

2 participants