use of com.fanap.podchat.chat.mention.model.RequestGetMentionList in project pod-chat-android-sdk by FanapSoft.
the class MentionCacheTest method populateMentionListFromServer.
public void populateMentionListFromServer(long threadId) {
chatListeners = new ChatListener() {
@Override
public void onGetMentionList(ChatResponse<ResultHistory> response) {
if (!response.isCache()) {
System.out.println("Received Mention Message List Server: " + response.getJson());
threadMentionMessagesListInServer.addAll(response.getResult().getHistory().stream().filter(messageVO -> messageVO.getMessage() != null).collect(Collectors.toList()));
chat.removeListener(chatListeners);
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestGetMentionList req = new RequestGetMentionList.Builder(threadId).offset(0).count(25).build();
presenter.getMentionList(req);
pauseProcess();
System.out.println("Received Mention Message List Server: " + threadMentionMessagesListInServer.size());
}
use of com.fanap.podchat.chat.mention.model.RequestGetMentionList in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method getMentionList.
private void getMentionList() {
RequestGetMentionList req = new RequestGetMentionList.Builder(TEST_THREAD_ID).offset(0).count(25).build();
presenter.getMentionList(req);
}
use of com.fanap.podchat.chat.mention.model.RequestGetMentionList in project pod-chat-android-sdk by FanapSoft.
the class MentionCacheTest method populateMentionListFromCache.
public void populateMentionListFromCache(long threadId) {
chatListeners = new ChatListener() {
@Override
public void onGetMentionList(ChatResponse<ResultHistory> response) {
if (response.isCache()) {
System.out.println("Received Mention Message List Server: " + response.getJson());
threadMentionMessagesListInCache.addAll(response.getResult().getHistory().stream().filter(messageVO -> messageVO.getMessage() != null).collect(Collectors.toList()));
chat.removeListener(chatListeners);
resumeProcess();
} else {
Assert.assertEquals(5, 10);
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestGetMentionList req = new RequestGetMentionList.Builder(threadId).offset(0).count(25).build();
presenter.getMentionList(req);
pauseProcess();
System.out.println("Received Mention Message List Server: " + threadMentionMessagesListInCache.size());
}
Aggregations