Skip to content
Snippets Groups Projects
Unverified Commit d311557f authored by akwizgran's avatar akwizgran
Browse files

Check whether first visible message ID is null before storing.

parent 3449677b
No related branches found
No related tags found
No related merge requests found
......@@ -99,19 +99,20 @@ public abstract class ThreadListControllerImpl<G extends NamedGroup, I extends T
@Override
public void onActivityDestroy() {
dbExecutor.execute(new Runnable() {
@Override
public void run() {
try {
messageTracker
.storeMessageId(groupId,
listener.getFirstVisibleMessageId());
} catch (DbException e) {
if (LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
final MessageId first = listener.getFirstVisibleMessageId();
if (first != null) {
dbExecutor.execute(new Runnable() {
@Override
public void run() {
try {
messageTracker.storeMessageId(groupId, first);
} catch (DbException e) {
if (LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
}
}
}
});
});
}
}
@CallSuper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment