diff options
author | David Luhmer <david-dev@live.de> | 2017-05-29 00:26:13 +0300 |
---|---|---|
committer | David Luhmer <david-dev@live.de> | 2017-05-29 00:26:13 +0300 |
commit | 58962362b75de441ba4d40b5d6f2f844ca8afb9f (patch) | |
tree | a6758328c35537f24e1c1affbf1d425223ef06db /News-Android-App/src/main/java/de/luhmer/owncloudnewsreader | |
parent | b789092cb6b31ac5256f9c8bb0e144a8276d37b6 (diff) |
Reuse DI Object
Diffstat (limited to 'News-Android-App/src/main/java/de/luhmer/owncloudnewsreader')
-rw-r--r-- | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java | 3 | ||||
-rw-r--r-- | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListFragment.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java index a1ecea6b..439034b8 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java @@ -787,7 +787,8 @@ public class NewsReaderListActivity extends PodcastFragmentActivity implements List<RssItem> buffer = mApi.getAPI().items(100, offset, type, id, true, false).execute().body(); RssItemObservable.performDatabaseBatchInsert(dbConn, buffer); } - }).subscribeOn(Schedulers.newThread()) + }) + .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action() { @Override diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListFragment.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListFragment.java index cfd6e289..3c875357 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListFragment.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListFragment.java @@ -323,7 +323,7 @@ public class NewsReaderListFragment extends Fragment implements OnCreateContextM } public void bindUserInfoToUI(boolean testMode) { - SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); + SharedPreferences mPrefs = ((PodcastFragmentActivity) getActivity()).mPrefs; String mUsername = mPrefs.getString(SettingsActivity.EDT_USERNAME_STRING, null); String mOc_root_path = mPrefs.getString(SettingsActivity.EDT_OWNCLOUDROOTPATH_STRING, getString(R.string.app_name)); mOc_root_path = mOc_root_path.replace("http://", "").replace("https://", ""); //Remove http:// or https:// |