mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Update logic from PR 611 that was just merged
This commit is contained in:
parent
1785e9b179
commit
4bda30116a
1 changed files with 2 additions and 2 deletions
|
|
@ -287,7 +287,7 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
//TODO: fix preference manager
|
||||
PreferenceManager.getDefaultSharedPreferences(app).edit().clear().commit();
|
||||
PreferenceManager.getDefaultSharedPreferences(getInstance()).edit().clear().commit();
|
||||
SharedPreferences preferences = context
|
||||
.getSharedPreferences("fr.free.nrw.commons", MODE_PRIVATE);
|
||||
preferences.edit().clear().commit();
|
||||
|
|
@ -302,7 +302,7 @@ public class CommonsApplication extends Application {
|
|||
* @param context context
|
||||
*/
|
||||
public void updateAllDatabases(Context context) {
|
||||
DBOpenHelper dbOpenHelper = DBOpenHelper.getInstance(context);
|
||||
DBOpenHelper dbOpenHelper = CommonsApplication.getInstance().getDBOpenHelper();
|
||||
dbOpenHelper.getReadableDatabase().close();
|
||||
SQLiteDatabase db = dbOpenHelper.getWritableDatabase();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue