Prevent crash on categories screen when rotating.

The docs say that initLoader tries to reuse existing cursors.
The error message was "IllegalStateException: attempt to re-open an
already-closed object: SQLiteQuery: ...".
This commit is contained in:
Peter Serwylo 2017-06-23 17:06:18 +10:00
parent 79ede18259
commit b1ac0ff351

View File

@ -62,7 +62,7 @@ class CategoriesViewBinder implements LoaderManager.LoaderCallbacks<Cursor> {
}
});
activity.getSupportLoaderManager().initLoader(LOADER_ID, null, this);
activity.getSupportLoaderManager().restartLoader(LOADER_ID, null, this);
}
@Override