avoid closing db for background threads.
This commit is contained in:
parent
2cd77e3f6d
commit
7f3319f805
|
@ -1683,9 +1683,6 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
if (mPageReferenceMap != null)
|
||||
mPageReferenceMap = null;
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("isMainActivityRunning", false).apply();
|
||||
if (Sqlite.db != null) {
|
||||
Sqlite.db.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -183,6 +183,7 @@ public class DisplayStatusFragment extends Fragment implements OnPostActionInter
|
|||
type = RetrieveFeedsAsyncTask.Type.CHANNEL;
|
||||
|
||||
|
||||
assert context != null;
|
||||
SQLiteDatabase db = Sqlite.getInstance(context.getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
//instanceType should not be null only for Peertube accounts
|
||||
|
||||
|
|
Loading…
Reference in New Issue