diff options
author | David-Development <david-dev@live.de> | 2021-10-27 00:11:49 +0300 |
---|---|---|
committer | David Luhmer <david-dev@live.de> | 2021-10-27 00:11:49 +0300 |
commit | 05449cb666059af7de2302df9d5c02997a23df85 (patch) | |
tree | b48059decc823d3424f7ab011a0e857ebc797d46 /News-Android-App/src/main/java | |
parent | 4cac4d5003c5282ba179ee2af2d7ddca31632ede (diff) |
fix GHSL-2021-1033
Signed-off-by: David Luhmer <david-dev@live.de>
Diffstat (limited to 'News-Android-App/src/main/java')
-rw-r--r-- | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java | 4 | ||||
-rw-r--r-- | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java | 17 |
2 files changed, 10 insertions, 11 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 86e1e0d9..3cccfc91 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 @@ -981,8 +981,8 @@ public class NewsReaderListActivity extends PodcastFragmentActivity implements } private void ensureCorrectTheme(Intent data) { - String oldListLayout = data.getStringExtra(SettingsActivity.SP_FEED_LIST_LAYOUT); - String newListLayout = mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT,"0"); + String oldListLayout = data.getStringExtra(SettingsActivity.AI_FEED_LIST_LAYOUT); + String newListLayout = mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0"); if (ThemeChooser.themeRequiresRestartOfUI() || !newListLayout.equals(oldListLayout)) { NewsReaderListActivity.this.recreate(); diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java index 875c9f63..46e90198 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java @@ -34,8 +34,6 @@ import javax.inject.Inject; import de.luhmer.owncloudnewsreader.helper.ThemeChooser; -import static de.luhmer.owncloudnewsreader.LoginDialogActivity.RESULT_LOGIN; - /** * A {@link PreferenceActivity} that presents a set of application settings. On * handset devices, settings are presented as a single list. On tablets, @@ -84,7 +82,8 @@ public class SettingsActivity extends AppCompatActivity { public static final String SP_APP_THEME = "sp_app_theme"; public static final String CB_OLED_MODE = "cb_oled_mode"; - public static final String SP_FEED_LIST_LAYOUT = "sp_feed_list_layout"; + public static final String SP_FEED_LIST_LAYOUT = "sp_feed_list_layout"; // used for shared prefs + public static final String AI_FEED_LIST_LAYOUT = "ai_feed_list_layout"; // used for intents public static final String SP_FONT_SIZE = "sp_font_size"; public static final String CACHE_CLEARED = "CACHE_CLEARED"; @@ -148,11 +147,11 @@ public class SettingsActivity extends AppCompatActivity { @Override protected void onStart() { super.onStart(); - Intent intent = getIntent(); - intent.putExtra( - SettingsActivity.SP_FEED_LIST_LAYOUT, - mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0") - ); - setResult(RESULT_OK,intent); + + // Fix GHSL-2021-1033 + Intent intent = new Intent(); + String feedListLayout = mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0"); + intent.putExtra(SettingsActivity.AI_FEED_LIST_LAYOUT, feedListLayout); + setResult(RESULT_OK, intent); } } |