use of com.fanap.podchat.chat.hashtag.model.RequestGetHashTagList in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method getHashTagHistory.
// public void getHashTagList() {
// RequestGetHashTagList request = new RequestGetHashTagList
// .Builder(TEST_THREAD_ID)
// .offset(0)
// .count(25)
// .setHashtag("ahmad")
// .build();
//
// presenter.getHashTagLIst(request, null);
// }
public void getHashTagHistory() {
RequestGetHashTagList request = new RequestGetHashTagList.Builder(TEST_THREAD_ID).setHashtag("test2").offset(0).count(25).build();
presenter.getHashTagList(request, null);
}
use of com.fanap.podchat.chat.hashtag.model.RequestGetHashTagList in project pod-chat-android-sdk by FanapSoft.
the class HashTagCacheTest method populateHashTagListFromServer.
public void populateHashTagListFromServer(long threadId) {
threadHashTagMessagesListInServer.clear();
chatListeners = new ChatListener() {
@Override
public void onGetHashTagList(ChatResponse<ResultHistory> response) {
if (!response.isCache()) {
System.out.println("Received HashTag Message List Server: " + response.getJson());
threadHashTagMessagesListInServer.addAll(response.getResult().getHistory().stream().filter(messageVO -> messageVO.getMessage() != null).collect(Collectors.toList()));
chat.removeListener(chatListeners);
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestGetHashTagList request = new RequestGetHashTagList.Builder(threadId).offset(0).count(25).setHashtag("test").build();
presenter.getHashTagList(request, null);
pauseProcess();
System.out.println("Received HashTag Message List Server: " + threadHashTagMessagesListInServer.size());
}
use of com.fanap.podchat.chat.hashtag.model.RequestGetHashTagList in project pod-chat-android-sdk by FanapSoft.
the class HashTagCacheTest method populateHashTagListFromCache.
public void populateHashTagListFromCache(long threadId) {
threadHashTagMessagesListInCache.clear();
chatListeners = new ChatListener() {
@Override
public void onGetHashTagList(ChatResponse<ResultHistory> response) {
if (response.isCache()) {
System.out.println("Received HashTag Message List Server: " + response.getJson());
threadHashTagMessagesListInCache.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);
RequestGetHashTagList request = new RequestGetHashTagList.Builder(threadId).offset(0).count(25).setHashtag("test").build();
presenter.getHashTagList(request, null);
pauseProcess();
System.out.println("Received HashTag Message List Server: " + threadHashTagMessagesListInCache.size());
}
use of com.fanap.podchat.chat.hashtag.model.RequestGetHashTagList in project pod-chat-android-sdk by FanapSoft.
the class ChatTestIntegration method getThreadHistory.
public void getThreadHistory(long threadId) {
threadId = 8093;
RequestGetHashTagList request = new RequestGetHashTagList.Builder(threadId).setHashtag("test").offset(0).count(25).build();
presenter.getHashTagList(request, new ChatHandler() {
@Override
public void onGetHistory(String uniqueId) {
super.onGetHistory(uniqueId);
}
});
}
Aggregations