Apply username and password when subscribing (#6675)
This commit is contained in:
parent
7cb0ba8156
commit
4dc1196c39
|
@ -539,19 +539,24 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
|||
viewBinding.subscribeButton.setText(R.string.open_podcast);
|
||||
if (didPressSubscribe) {
|
||||
didPressSubscribe = false;
|
||||
|
||||
Feed feed1 = DBReader.getFeed(getFeedId());
|
||||
FeedPreferences feedPreferences = feed1.getPreferences();
|
||||
if (UserPreferences.isEnableAutodownload()) {
|
||||
boolean autoDownload = viewBinding.autoDownloadCheckBox.isChecked();
|
||||
|
||||
Feed feed1 = DBReader.getFeed(getFeedId());
|
||||
FeedPreferences feedPreferences = feed1.getPreferences();
|
||||
feedPreferences.setAutoDownload(autoDownload);
|
||||
DBWriter.setFeedPreferences(feedPreferences);
|
||||
|
||||
SharedPreferences preferences = getSharedPreferences(PREFS, MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean(PREF_LAST_AUTO_DOWNLOAD, autoDownload);
|
||||
editor.apply();
|
||||
}
|
||||
if (username != null) {
|
||||
feedPreferences.setUsername(username);
|
||||
feedPreferences.setPassword(password);
|
||||
}
|
||||
DBWriter.setFeedPreferences(feedPreferences);
|
||||
|
||||
openFeed();
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue