use of com.fanap.podchat.model.ResultThreads in project pod-chat-android-sdk by FanapSoft.
the class IntegrationTest method populateThreadsListFromServerOnly.
// requests for list of threads from server
@Test
public void populateThreadsListFromServerOnly() {
chatListeners = new ChatListener() {
@Override
public void onGetThread(String content, ChatResponse<ResultThreads> thread) {
if (!thread.isCache()) {
System.out.println("Received List: " + content);
threads.addAll(thread.getResult().getThreads());
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestThread requestThread = new RequestThread.Builder().count(25).withNoCache().build();
presenter.getThreads(requestThread, null);
pauseProcess();
System.out.println("Received List: " + threads.size());
}
use of com.fanap.podchat.model.ResultThreads in project pod-chat-android-sdk by FanapSoft.
the class IntegrationTest method populateThreadsListFromCacheOnly.
// requests for list of threads from cache
@Test
public void populateThreadsListFromCacheOnly() {
chatListeners = new ChatListener() {
@Override
public void onGetThread(String content, ChatResponse<ResultThreads> thread) {
if (thread.isCache()) {
System.out.println("Received List: " + content);
threads.addAll(thread.getResult().getThreads());
resumeProcess();
}
}
};
chat.addListener(chatListeners);
RequestThread requestThread = new RequestThread.Builder().count(25).build();
presenter.getThreads(requestThread, null);
pauseProcess();
System.out.println("Received List: " + threads.size());
}
use of com.fanap.podchat.model.ResultThreads in project pod-chat-android-sdk by FanapSoft.
the class HashTagCacheTest method populateMessageFromServer.
public void populateMessageFromServer() {
chatListeners = new ChatListener() {
@Override
public void onGetThread(String content, ChatResponse<ResultThreads> response) {
if (!response.isCache()) {
System.out.println("Received List: " + content);
for (Thread thread : response.getResult().getThreads()) {
if (thread.isGroup()) {
threads.add(thread);
}
}
chat.removeListener(chatListeners);
resumeProcess();
}
}
};
chat.setListener(chatListeners);
RequestThread requestThread = new RequestThread.Builder().count(25).withNoCache().build();
presenter.getThreads(requestThread, null);
pauseProcess();
System.out.println("Received List: " + threads.size());
}
Aggregations