mirror of https://github.com/M66B/FairEmail.git
Removed transaction from search
This commit is contained in:
parent
6d196e8839
commit
14389f9efa
|
@ -141,6 +141,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
executor.submit(new Runnable() {
|
executor.submit(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Log.i("Boundary run");
|
||||||
|
|
||||||
int found = 0;
|
int found = 0;
|
||||||
try {
|
try {
|
||||||
if (state.destroyed || state.error)
|
if (state.destroyed || state.error)
|
||||||
|
@ -228,9 +230,6 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
db.beginTransaction();
|
|
||||||
|
|
||||||
while (found < pageSize && !state.destroyed) {
|
while (found < pageSize && !state.destroyed) {
|
||||||
if (state.matches == null ||
|
if (state.matches == null ||
|
||||||
(state.matches.size() > 0 && state.index >= state.matches.size())) {
|
(state.matches.size() > 0 && state.index >= state.matches.size())) {
|
||||||
|
@ -295,14 +294,6 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
|
||||||
|
|
||||||
if (found == pageSize)
|
|
||||||
return found;
|
|
||||||
} finally {
|
|
||||||
db.endTransaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.i("Boundary device done");
|
Log.i("Boundary device done");
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
@ -491,9 +482,6 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
state.ifolder.fetch(add.toArray(new Message[0]), fp);
|
state.ifolder.fetch(add.toArray(new Message[0]), fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
db.beginTransaction();
|
|
||||||
|
|
||||||
Core.State astate = new Core.State(ConnectionHelper.getNetworkState(context));
|
Core.State astate = new Core.State(ConnectionHelper.getNetworkState(context));
|
||||||
for (int j = isub.length - 1; j >= 0 && found < pageSize && !state.destroyed && astate.isRecoverable(); j--)
|
for (int j = isub.length - 1; j >= 0 && found < pageSize && !state.destroyed && astate.isRecoverable(); j--)
|
||||||
try {
|
try {
|
||||||
|
@ -526,11 +514,6 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
} finally {
|
} finally {
|
||||||
((IMAPMessage) isub[j]).invalidateHeaders();
|
((IMAPMessage) isub[j]).invalidateHeaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
|
||||||
} finally {
|
|
||||||
db.endTransaction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.index < 0) {
|
if (state.index < 0) {
|
||||||
|
|
Loading…
Reference in New Issue