Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 0856928

Browse files
kunall17niftynei
authored andcommitted
Function to fill chatBox on narrow.
1 parent 880fd2a commit 0856928

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/src/main/java/com/zulip/android/activities/ZulipActivity.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,19 @@ public void doNarrow(NarrowFilter filter) {
793793
}
794794

795795
@Override
796+
public void onNarrowFillSendBox(Message message) {
797+
if(message.getType() == MessageType.PRIVATE_MESSAGE){
798+
switchToPrivate();
799+
topicActv.setText(message.getReplyTo(app));
800+
messageEt.requestFocus();
801+
} else {
802+
switchToStream();
803+
streamActv.setText(message.getStream().getName());
804+
topicActv.setText(message.getSubject());
805+
if ("".equals(message.getSubject())) topicActv.requestFocus();
806+
else messageEt.requestFocus();
807+
}
808+
}
796809
public void onNarrow(NarrowFilter narrowFilter) {
797810
// TODO: check if already narrowed to this particular stream/subject
798811
doNarrow(narrowFilter);

0 commit comments

Comments
 (0)