Skip to content

Commit

Permalink
fix: composer under keyboard when you press Edit message
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Mar 27, 2024
1 parent db7eca4 commit f9a1338
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const States = {
ATTACHMENTS_POPOVER_WITH_KEYBOARD_CLOSED: 'attachmentsPopoverWithKeyboardClosed',
MODAL_DELETED: 'modalDeleted',
MODAL_WITH_KEYBOARD_OPEN_DELETED: 'modalWithKeyboardOpenDeleted',
EDIT_MESSAGE: 'editMessage',
};

const STATE_MACHINE = {
Expand Down Expand Up @@ -141,6 +142,7 @@ const STATE_MACHINE = {
[Actions.MEASURE_EMOJI_PICKER_POPOVER]: States.KEYBOARD_POPOVER_OPEN,
[Actions.OPEN_EMOJI_PICKER_POPOVER]: States.EMOJI_PICKER_POPOVER_WITH_KEYBOARD_OPEN,
[Actions.SHOW_DELETE_CONFIRM_MODAL]: States.MODAL_WITH_KEYBOARD_OPEN_DELETED,
[Actions.EDIT_REPORT]: States.EDIT_MESSAGE,
},
[States.MODAL_WITH_KEYBOARD_OPEN_DELETED]: {
[Actions.MEASURE_CONFIRM_MODAL]: States.MODAL_WITH_KEYBOARD_OPEN_DELETED,
Expand Down Expand Up @@ -177,6 +179,9 @@ const STATE_MACHINE = {
[Actions.OPEN_KEYBOARD]: States.KEYBOARD_OPEN,
[Actions.END_TRANSITION]: States.KEYBOARD_OPEN,
},
[States.EDIT_MESSAGE]: {
[Actions.CLOSE_KEYBOARD]: States.IDLE,
},
};

function ActionSheetAwareScrollViewProvider(props: PropsWithChildren<unknown>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ function ActionSheetKeyboardSpace(props: ViewProps) {
duration: 0,
});
}
case States.EDIT_MESSAGE: {
return 0;
}

default:
return 0;
Expand Down

0 comments on commit f9a1338

Please sign in to comment.