kopia lustrzana https://github.com/ryukoposting/Signal-Android
Show/hide attachment keyboard with the reaction overlay.
rodzic
2e9f43cf94
commit
0209db4531
|
@ -1427,6 +1427,8 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
|
|
||||||
public interface ConversationFragmentListener extends VoiceNoteMediaControllerOwner {
|
public interface ConversationFragmentListener extends VoiceNoteMediaControllerOwner {
|
||||||
boolean isKeyboardOpen();
|
boolean isKeyboardOpen();
|
||||||
|
boolean isAttachmentKeyboardOpen();
|
||||||
|
void openAttachmentKeyboard();
|
||||||
void setThreadId(long threadId);
|
void setThreadId(long threadId);
|
||||||
void handleReplyMessage(ConversationMessage conversationMessage);
|
void handleReplyMessage(ConversationMessage conversationMessage);
|
||||||
void onMessageActionToolbarOpened();
|
void onMessageActionToolbarOpened();
|
||||||
|
@ -1599,6 +1601,8 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
conversationViewModel.setShowScrollButtons(false);
|
conversationViewModel.setShowScrollButtons(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isAttachmentKeyboardOpen = listener.isAttachmentKeyboardOpen();
|
||||||
|
|
||||||
listener.handleReaction(item.getConversationMessage(),
|
listener.handleReaction(item.getConversationMessage(),
|
||||||
new ReactionsToolbarListener(item.getConversationMessage()),
|
new ReactionsToolbarListener(item.getConversationMessage()),
|
||||||
selectedConversationModel,
|
selectedConversationModel,
|
||||||
|
@ -1630,6 +1634,10 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
if (showScrollButtons) {
|
if (showScrollButtons) {
|
||||||
conversationViewModel.setShowScrollButtons(true);
|
conversationViewModel.setShowScrollButtons(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAttachmentKeyboardOpen) {
|
||||||
|
listener.openAttachmentKeyboard();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3887,6 +3887,9 @@ public class ConversationParentFragment extends Fragment
|
||||||
reactionDelegate.setOnActionSelectedListener(onActionSelectedListener);
|
reactionDelegate.setOnActionSelectedListener(onActionSelectedListener);
|
||||||
reactionDelegate.setOnHideListener(onHideListener);
|
reactionDelegate.setOnHideListener(onHideListener);
|
||||||
reactionDelegate.show(requireActivity(), recipient.get(), conversationMessage, groupViewModel.isNonAdminInAnnouncementGroup(), selectedConversationModel);
|
reactionDelegate.show(requireActivity(), recipient.get(), conversationMessage, groupViewModel.isNonAdminInAnnouncementGroup(), selectedConversationModel);
|
||||||
|
if (attachmentKeyboardStub.resolved()) {
|
||||||
|
attachmentKeyboardStub.get().hide(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3964,6 +3967,16 @@ public class ConversationParentFragment extends Fragment
|
||||||
return container.isKeyboardOpen();
|
return container.isKeyboardOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAttachmentKeyboardOpen() {
|
||||||
|
return attachmentKeyboardStub.resolved() && attachmentKeyboardStub.get().isShowing();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openAttachmentKeyboard() {
|
||||||
|
attachmentKeyboardStub.get().show(container.getKeyboardHeight(), true);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setThreadId(long threadId) {
|
public void setThreadId(long threadId) {
|
||||||
this.threadId = threadId;
|
this.threadId = threadId;
|
||||||
|
|
Ładowanie…
Reference in New Issue