use of com.fanap.podchat.model.ResultClearHistory in project pod-chat-android-sdk by FanapSoft.
the class ChatCore method handleClearHistory.
private void handleClearHistory(ChatMessage chatMessage) {
ChatResponse<ResultClearHistory> chatResponseClrHistory = new ChatResponse<>();
ResultClearHistory resultClearHistory = new ResultClearHistory();
long clrHistoryThreadId = gson.fromJson(chatMessage.getContent(), Long.class);
resultClearHistory.setThreadId(clrHistoryThreadId);
chatResponseClrHistory.setResult(resultClearHistory);
chatResponseClrHistory.setUniqueId(chatMessage.getUniqueId());
chatResponseClrHistory.setSubjectId(chatMessage.getSubjectId());
String jsonClrHistory = gson.toJson(chatResponseClrHistory);
if (sentryResponseLog) {
showLog("RECEIVE_CLEAR_HISTORY", jsonClrHistory);
} else {
showLog("RECEIVE_CLEAR_HISTORY");
}
if (cache) {
messageDatabaseHelper.deleteMessagesOfThread(chatMessage.getSubjectId());
}
listenerManager.callOnClearHistory(jsonClrHistory, chatResponseClrHistory);
}
Aggregations