diff options
author | Andrew Dolgov <[email protected]> | 2015-06-11 08:32:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-11 08:32:27 +0300 |
commit | bc2cef963080afefd1b0c8f4e5c74fa6f4b5ce69 (patch) | |
tree | 7ef9cb4f8950e05be26f641bd5704e644ac4958b /org.fox.ttrss/src/main | |
parent | cbc88f57e1f2748e5cb66b2f7db67ecb321527cc (diff) |
restart when cats get enabled/disabled
Diffstat (limited to 'org.fox.ttrss/src/main')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java index 0df1c48f..2c3abf1a 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -40,6 +40,7 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList private boolean m_feedIsSelected = false; private boolean m_userFeedSelected = false; + private boolean m_catsEnabled = false; private ActionBarDrawerToggle m_drawerToggle; private DrawerLayout m_drawerLayout; @@ -61,6 +62,8 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); + m_catsEnabled = m_prefs.getBoolean("enable_cats", false); + Application.getInstance().load(savedInstanceState); m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer); @@ -409,6 +412,14 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList public void onResume() { super.onResume(); invalidateOptionsMenu(); + + if (!m_catsEnabled == m_prefs.getBoolean("enable_cats", false)) { + Log.d(TAG, "root view settings changed, restarting"); + + finish(); + startActivity(getIntent()); + } + } @Override |