Skip to content

Conversation

@naveensingh
Copy link
Member

My new keyboard is still in transit :(

Closes #786

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash that occurred when the editor was launched from other apps for cropping purposes. The crash was caused by attempting to cast layout parameters to the wrong type (RelativeLayout instead of ConstraintLayout).

Key Changes

  • Corrected layout parameter type from RelativeLayout.LayoutParams to ConstraintLayout.LayoutParams to match the actual parent layout
  • Moved isCropIntent initialization earlier to support conditional edge-to-edge padding setup
  • Added null-safe casting and proper constraint setting for the crop/rotate actions when in crop intent mode

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/main/kotlin/org/fossify/gallery/activities/EditActivity.kt Fixed crash by using correct ConstraintLayout.LayoutParams instead of RelativeLayout.LayoutParams when adjusting bottom action constraints in crop mode
CHANGELOG.md Added changelog entry for the crash fix with reference to issue #786

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@naveensingh naveensingh merged commit b402180 into main Nov 23, 2025
12 checks passed
@naveensingh naveensingh deleted the naveensingh/fix-editor-crash branch November 23, 2025 12:29
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.

App crashes when cropping in external apps

2 participants