restart when cats get enabled/disabled
This commit is contained in:
parent
cbc88f57e1
commit
bc2cef9630
@ -40,6 +40,7 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
|
|
||||||
private boolean m_feedIsSelected = false;
|
private boolean m_feedIsSelected = false;
|
||||||
private boolean m_userFeedSelected = false;
|
private boolean m_userFeedSelected = false;
|
||||||
|
private boolean m_catsEnabled = false;
|
||||||
|
|
||||||
private ActionBarDrawerToggle m_drawerToggle;
|
private ActionBarDrawerToggle m_drawerToggle;
|
||||||
private DrawerLayout m_drawerLayout;
|
private DrawerLayout m_drawerLayout;
|
||||||
@ -61,6 +62,8 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
m_catsEnabled = m_prefs.getBoolean("enable_cats", false);
|
||||||
|
|
||||||
Application.getInstance().load(savedInstanceState);
|
Application.getInstance().load(savedInstanceState);
|
||||||
|
|
||||||
m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer);
|
m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer);
|
||||||
@ -409,6 +412,14 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
|
|
||||||
|
if (!m_catsEnabled == m_prefs.getBoolean("enable_cats", false)) {
|
||||||
|
Log.d(TAG, "root view settings changed, restarting");
|
||||||
|
|
||||||
|
finish();
|
||||||
|
startActivity(getIntent());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user