don't open drawer all the time on startup

This commit is contained in:
Andrew Dolgov 2014-11-06 21:05:10 +03:00
parent 3e197adbc2
commit be1e45e9f2
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="270"
android:versionCode="271"
android:versionName="1.64" >
<uses-sdk

View File

@ -76,6 +76,12 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
if (m_prefs.getBoolean("drawer_open_on_start", true)) {
SharedPreferences.Editor editor = m_prefs.edit();
editor.putBoolean("drawer_open_on_start", false);
editor.commit();
}
invalidateOptionsMenu();
}
};
@ -88,7 +94,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
}
if (savedInstanceState == null) {
if (m_drawerLayout != null) {
if (m_drawerLayout != null && m_prefs.getBoolean("drawer_open_on_start", true)) {
m_drawerLayout.openDrawer(Gravity.START);
}
@ -145,6 +151,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
ft.commit();
m_feedIsSelected = true;
AppRater.appLaunched(this);
checkTrial(true);