Skip to content

Commit

Permalink
Add constructor for single tweak store
Browse files Browse the repository at this point in the history
  • Loading branch information
Blanka Kulik committed Sep 6, 2017
1 parent f3a07bb commit 14f12b8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ private TweakStore(Context context, String tweakStoreName) {
this.sharedPreferences = context.getSharedPreferences(SHARED_PREFERENCES + "." + tweakStoreName, MODE_PRIVATE);
}

public static TweakStore getInstance(Context context) {
return getInstance(context, "Tweaks");
}

public static TweakStore getInstance(Context context, String tweakStoreName) {
if (tweakStore == null || !tweakStore.getTweakStoreName().equals(tweakStoreName)) {
tweakStore = new TweakStore(context, tweakStoreName);
Expand Down

0 comments on commit 14f12b8

Please sign in to comment.