|
@ -91,7 +91,6 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
Log.i(Helper.TAG, "Boundary close"); |
|
|
Log.i(Helper.TAG, "Boundary close"); |
|
|
DB.getInstance(context).message().deleteFoundMessages(); |
|
|
|
|
|
try { |
|
|
try { |
|
|
if (istore != null) |
|
|
if (istore != null) |
|
|
istore.close(); |
|
|
istore.close(); |
|
@ -207,11 +206,13 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe |
|
|
try { |
|
|
try { |
|
|
long uid = ifolder.getUID(isub[j]); |
|
|
long uid = ifolder.getUID(isub[j]); |
|
|
Log.i(Helper.TAG, "Boundary sync uid=" + uid); |
|
|
Log.i(Helper.TAG, "Boundary sync uid=" + uid); |
|
|
if (db.message().getMessageByUid(fid, uid) == null) { |
|
|
|
|
|
|
|
|
EntityMessage message = db.message().getMessageByUid(fid, uid); |
|
|
|
|
|
if (message == null) { |
|
|
ServiceSynchronize.synchronizeMessage(context, folder, ifolder, (IMAPMessage) isub[j], search != null); |
|
|
ServiceSynchronize.synchronizeMessage(context, folder, ifolder, (IMAPMessage) isub[j], search != null); |
|
|
count++; |
|
|
count++; |
|
|
loaded++; |
|
|
loaded++; |
|
|
} |
|
|
|
|
|
|
|
|
} else |
|
|
|
|
|
db.message().setMessageFound(message.id, true); |
|
|
} catch (MessageRemovedException ex) { |
|
|
} catch (MessageRemovedException ex) { |
|
|
Log.w(Helper.TAG, "Boundary " + ex + "\n" + Log.getStackTraceString(ex)); |
|
|
Log.w(Helper.TAG, "Boundary " + ex + "\n" + Log.getStackTraceString(ex)); |
|
|
} catch (FolderClosedException ex) { |
|
|
} catch (FolderClosedException ex) { |
|
|