pull/209/head
M66B 3 years ago
parent d41aa4e63f
commit 37e9a69ff2

@ -154,7 +154,7 @@ public abstract class LimitOffsetDataSource<T> extends androidx.paging.Positiona
@NonNull LoadInitialCallback<T> callback) { @NonNull LoadInitialCallback<T> callback) {
registerObserverIfNecessary(); registerObserverIfNecessary();
List<T> list = Collections.emptyList(); List<T> list = Collections.emptyList();
int totalCount; int totalCount = 0;
int firstLoadPosition = 0; int firstLoadPosition = 0;
RoomSQLiteQuery sqLiteQuery = null; RoomSQLiteQuery sqLiteQuery = null;
Cursor cursor = null; Cursor cursor = null;
@ -172,6 +172,8 @@ public abstract class LimitOffsetDataSource<T> extends androidx.paging.Positiona
mDb.setTransactionSuccessful(); mDb.setTransactionSuccessful();
list = rows; list = rows;
} }
} catch (Throwable ex) {
eu.faircode.email.Log.w(ex);
} finally { } finally {
if (cursor != null) { if (cursor != null) {
cursor.close(); cursor.close();

Loading…
Cancel
Save