Search in sources :

Example 1 with CacheMutualGroupVo

use of com.fanap.podchat.cachemodel.CacheMutualGroupVo in project pod-chat-android-sdk by FanapSoft.

the class MessageDatabaseHelper method saveMutualThreads.

public void saveMutualThreads(@NonNull List<Thread> threads, long userId) {
    worker(() -> {
        List<String> threadids = new ArrayList<>();
        CacheMutualGroupVo cacheMutualGroupVo = new CacheMutualGroupVo();
        cacheMutualGroupVo.setContactId(userId);
        for (Thread thread : threads) {
            if (thread.getId() > 0) {
                threadids.add(String.valueOf(thread.getId()));
            }
        }
        cacheMutualGroupVo.setThreadids(threadids);
        messageDao.insertCacheMutualVo(cacheMutualGroupVo);
    });
}
Also used : CacheMutualGroupVo(com.fanap.podchat.cachemodel.CacheMutualGroupVo) ArrayList(java.util.ArrayList) Thread(com.fanap.podchat.mainmodel.Thread)

Aggregations

CacheMutualGroupVo (com.fanap.podchat.cachemodel.CacheMutualGroupVo)1 Thread (com.fanap.podchat.mainmodel.Thread)1 ArrayList (java.util.ArrayList)1