mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Use Dagger injection to store title and desc
This commit is contained in:
parent
351c3f2534
commit
31fcb212c2
1 changed files with 2 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ public class DirectUpload {
|
|||
private Fragment fragment;
|
||||
private SharedPreferences prefs;
|
||||
|
||||
|
||||
@Inject @Named("direct_nearby_upload_prefs") SharedPreferences directPrefs;
|
||||
|
||||
DirectUpload(String title, String desc, Fragment fragment, ContributionController controller, SharedPreferences prefs) {
|
||||
this.title = title;
|
||||
|
|
@ -36,8 +36,7 @@ public class DirectUpload {
|
|||
}
|
||||
|
||||
void storeSharedPrefs() {
|
||||
SharedPreferences sharedPref = fragment.getActivity().getSharedPreferences("Direct Upload", Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sharedPref.edit();
|
||||
SharedPreferences.Editor editor = directPrefs.edit();
|
||||
|
||||
editor.putString("Title", title);
|
||||
editor.putString("Desc", desc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue