mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Store message count, unread count and timestamp of latest message
in group metadata to be able to speed up group listings. Closes #584, #586, #585
This commit is contained in:
@@ -291,13 +291,15 @@ public class ForumControllerImpl extends DbControllerImpl
|
||||
|
||||
@Override
|
||||
public void entriesRead(final Collection<ForumEntry> forumEntries) {
|
||||
if (forum == null) return;
|
||||
runOnDbThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
long now = System.currentTimeMillis();
|
||||
for (ForumEntry fe : forumEntries) {
|
||||
forumManager.setReadFlag(fe.getId(), true);
|
||||
forumManager
|
||||
.setReadFlag(forum.getId(), fe.getId(), true);
|
||||
}
|
||||
long duration = System.currentTimeMillis() - now;
|
||||
if (LOG.isLoggable(INFO))
|
||||
|
||||
Reference in New Issue
Block a user