Show/hide attachment keyboard with the reaction overlay.
This commit is contained in:
parent
2e9f43cf94
commit
0209db4531
2 changed files with 21 additions and 0 deletions
|
@ -1427,6 +1427,8 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
|||
|
||||
public interface ConversationFragmentListener extends VoiceNoteMediaControllerOwner {
|
||||
boolean isKeyboardOpen();
|
||||
boolean isAttachmentKeyboardOpen();
|
||||
void openAttachmentKeyboard();
|
||||
void setThreadId(long threadId);
|
||||
void handleReplyMessage(ConversationMessage conversationMessage);
|
||||
void onMessageActionToolbarOpened();
|
||||
|
@ -1599,6 +1601,8 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
|||
conversationViewModel.setShowScrollButtons(false);
|
||||
}
|
||||
|
||||
boolean isAttachmentKeyboardOpen = listener.isAttachmentKeyboardOpen();
|
||||
|
||||
listener.handleReaction(item.getConversationMessage(),
|
||||
new ReactionsToolbarListener(item.getConversationMessage()),
|
||||
selectedConversationModel,
|
||||
|
@ -1630,6 +1634,10 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
|||
if (showScrollButtons) {
|
||||
conversationViewModel.setShowScrollButtons(true);
|
||||
}
|
||||
|
||||
if (isAttachmentKeyboardOpen) {
|
||||
listener.openAttachmentKeyboard();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3887,6 +3887,9 @@ public class ConversationParentFragment extends Fragment
|
|||
reactionDelegate.setOnActionSelectedListener(onActionSelectedListener);
|
||||
reactionDelegate.setOnHideListener(onHideListener);
|
||||
reactionDelegate.show(requireActivity(), recipient.get(), conversationMessage, groupViewModel.isNonAdminInAnnouncementGroup(), selectedConversationModel);
|
||||
if (attachmentKeyboardStub.resolved()) {
|
||||
attachmentKeyboardStub.get().hide(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3964,6 +3967,16 @@ public class ConversationParentFragment extends Fragment
|
|||
return container.isKeyboardOpen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttachmentKeyboardOpen() {
|
||||
return attachmentKeyboardStub.resolved() && attachmentKeyboardStub.get().isShowing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openAttachmentKeyboard() {
|
||||
attachmentKeyboardStub.get().show(container.getKeyboardHeight(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThreadId(long threadId) {
|
||||
this.threadId = threadId;
|
||||
|
|
Loading…
Add table
Reference in a new issue