use of com.xabber.android.ui.fragment.ChatViewerFragment in project xabber-android by redsolution.
the class ChatViewer method onContactsChanged.
@Override
public void onContactsChanged(Collection<BaseEntity> entities) {
for (BaseEntity contact : entities) {
for (ChatViewerFragment chat : registeredChats) {
if (chat.isEqual(contact)) {
chat.updateChat();
}
}
}
updateRegisteredRecentChatsFragments();
updateStatusBar();
}
use of com.xabber.android.ui.fragment.ChatViewerFragment in project xabber-android by redsolution.
the class ChatViewer method insertExtraText.
private void insertExtraText() {
if (extraText == null) {
return;
}
boolean isExtraTextInserted = false;
for (ChatViewerFragment chat : registeredChats) {
if (chat.isEqual(selectedChat)) {
chat.setInputText(extraText);
isExtraTextInserted = true;
}
}
if (isExtraTextInserted) {
extraText = null;
}
}
use of com.xabber.android.ui.fragment.ChatViewerFragment in project xabber-android by redsolution.
the class ChatViewer method onChatChanged.
@Override
public void onChatChanged(final String account, final String user, final boolean incoming) {
if (chatViewerAdapter.updateChats()) {
chatScrollIndicatorAdapter.update(chatViewerAdapter.getActiveChats());
selectPage();
} else {
for (ChatViewerFragment chat : registeredChats) {
if (chat.isEqual(selectedChat)) {
chat.updateChat();
if (incoming) {
chat.playIncomingAnimation();
}
}
}
updateRegisteredRecentChatsFragments();
updateStatusBar();
}
}
Aggregations