mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 09:42:17 -05:00
only show load more messages button when mam is available
also update ui after that button has been pressed. fixes #1695
This commit is contained in:
parent
356199978e
commit
8ccb2005b3
@ -1606,6 +1606,7 @@ public class ConversationActivity extends XmppActivity
|
||||
public void setMessagesLoaded() {
|
||||
if (mConversationFragment != null) {
|
||||
mConversationFragment.setMessagesLoaded();
|
||||
mConversationFragment.updateMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ import eu.siacs.conversations.ui.adapter.MessageAdapter.OnContactPictureClicked;
|
||||
import eu.siacs.conversations.ui.adapter.MessageAdapter.OnContactPictureLongClicked;
|
||||
import eu.siacs.conversations.utils.GeoHelper;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
import eu.siacs.conversations.xmpp.chatstate.ChatState;
|
||||
import eu.siacs.conversations.xmpp.jid.Jid;
|
||||
|
||||
@ -1014,7 +1015,10 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
|
||||
protected void updateStatusMessages() {
|
||||
synchronized (this.messageList) {
|
||||
if (conversation.getLastClearHistory() != 0) {
|
||||
final XmppConnection connection = conversation.getAccount().getXmppConnection();
|
||||
if (conversation.getLastClearHistory() != 0
|
||||
&& connection != null
|
||||
&& connection.getFeatures().mam()) {
|
||||
this.messageList.add(0, Message.createLoadMoreMessage(conversation));
|
||||
}
|
||||
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
||||
|
Loading…
Reference in New Issue
Block a user