mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Consolidate shared prefs to a single store (#2613)
* Consolidate shared prefs to a single store * Fix achievements activity * Fix store usage
This commit is contained in:
parent
51f58b7118
commit
7cb87f3cab
41 changed files with 207 additions and 279 deletions
|
|
@ -35,7 +35,8 @@ import fr.free.nrw.commons.concurrency.ThreadPoolService;
|
|||
import fr.free.nrw.commons.contributions.ContributionDao;
|
||||
import fr.free.nrw.commons.data.DBOpenHelper;
|
||||
import fr.free.nrw.commons.di.ApplicationlessInjection;
|
||||
import fr.free.nrw.commons.kvstore.BasicKvStore;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.logging.FileLoggingTree;
|
||||
import fr.free.nrw.commons.logging.LogUtils;
|
||||
import fr.free.nrw.commons.modifications.ModifierSequenceDao;
|
||||
|
|
@ -57,8 +58,7 @@ public class CommonsApplication extends Application {
|
|||
@Inject SessionManager sessionManager;
|
||||
@Inject DBOpenHelper dbOpenHelper;
|
||||
|
||||
@Inject @Named("default_preferences") BasicKvStore defaultPrefs;
|
||||
@Inject @Named("application_preferences") BasicKvStore applicationPrefs;
|
||||
@Inject @Named("default_preferences") JsonKvStore defaultPrefs;
|
||||
|
||||
/**
|
||||
* Constants begin
|
||||
|
|
@ -213,8 +213,7 @@ public class CommonsApplication extends Application {
|
|||
Timber.d("All accounts have been removed");
|
||||
//TODO: fix preference manager
|
||||
defaultPrefs.clearAll();
|
||||
applicationPrefs.clearAll();
|
||||
applicationPrefs.putBoolean("firstrun", false);
|
||||
defaultPrefs.putBoolean("firstrun", false);
|
||||
updateAllDatabases();
|
||||
logoutListener.onLogoutComplete();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue