Compare commits
No commits in common. "210d1c9ac03fdfbf74bb71a4ff643f9b84c50c89" and "8b3e121e94edd1ff16b744130338c50efcb1d347" have entirely different histories.
210d1c9ac0
...
8b3e121e94
|
@ -1388,7 +1388,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
if (savedInstanceState == null && conversation != null) {
|
if (savedInstanceState == null) {
|
||||||
conversation.jumpToLatest();
|
conversation.jumpToLatest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3233,19 +3233,10 @@ public class ConversationFragment extends XmppFragment
|
||||||
.setOpenConversation(this.conversation);
|
.setOpenConversation(this.conversation);
|
||||||
|
|
||||||
if (commandAdapter != null && conversation != originalConversation) {
|
if (commandAdapter != null && conversation != originalConversation) {
|
||||||
View currentFocus = null;
|
|
||||||
if (activity != null) {
|
|
||||||
currentFocus = activity.getCurrentFocus();
|
|
||||||
}
|
|
||||||
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, originalConversation);
|
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, originalConversation);
|
||||||
refreshCommands();
|
refreshCommands();
|
||||||
maybeRestoreMessageInputFocus(currentFocus);
|
|
||||||
}
|
}
|
||||||
if (commandAdapter == null && conversation != null) {
|
if (commandAdapter == null && conversation != null) {
|
||||||
View currentFocus = null;
|
|
||||||
if (activity != null) {
|
|
||||||
currentFocus = activity.getCurrentFocus();
|
|
||||||
}
|
|
||||||
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, null);
|
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, null);
|
||||||
commandAdapter = new CommandAdapter((XmppActivity) getActivity());
|
commandAdapter = new CommandAdapter((XmppActivity) getActivity());
|
||||||
binding.commandsView.setAdapter(commandAdapter);
|
binding.commandsView.setAdapter(commandAdapter);
|
||||||
|
@ -3256,7 +3247,6 @@ public class ConversationFragment extends XmppFragment
|
||||||
activity.startCommand(conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node"));
|
activity.startCommand(conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node"));
|
||||||
});
|
});
|
||||||
refreshCommands();
|
refreshCommands();
|
||||||
maybeRestoreMessageInputFocus(currentFocus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
previousClickedReply = null;
|
previousClickedReply = null;
|
||||||
|
@ -3301,12 +3291,6 @@ public class ConversationFragment extends XmppFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void maybeRestoreMessageInputFocus(View currentFocus) {
|
|
||||||
if (currentFocus == this.binding.textinput) {
|
|
||||||
this.binding.textinput.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void resetUnreadMessagesCount() {
|
private void resetUnreadMessagesCount() {
|
||||||
lastMessageUuid = null;
|
lastMessageUuid = null;
|
||||||
hideUnreadMessagesCount();
|
hideUnreadMessagesCount();
|
||||||
|
|
Loading…
Reference in a new issue