mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Fixed Navslider option changes not causing activity restart
This commit is contained in:
parent
8854ba35b2
commit
48a7680930
1 changed files with 6 additions and 10 deletions
|
@ -28,6 +28,7 @@ import android.preference.ListPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
@ -87,7 +88,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
|
||||||
public boolean onPreferenceTreeClick(PreferenceScreen screen, Preference preference) {
|
public boolean onPreferenceTreeClick(PreferenceScreen screen, Preference preference) {
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
String podDomain = ((App) getApplication()).getSettings().getPodDomain();
|
String podDomain = ((App) getApplication()).getSettings().getPodDomain();
|
||||||
|
|
||||||
switch (preference.getTitleRes()) {
|
switch (preference.getTitleRes()) {
|
||||||
case R.string.pref_title__personal_settings: {
|
case R.string.pref_title__personal_settings: {
|
||||||
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
||||||
|
@ -125,15 +125,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
|
||||||
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case R.string.nav_activities:
|
|
||||||
case R.string.nav_aspects:
|
|
||||||
case R.string.nav_commented:
|
|
||||||
case R.string.nav_followed_tags:
|
|
||||||
case R.string.nav_help_license:
|
|
||||||
case R.string.nav_liked:
|
|
||||||
case R.string.nav_mentions:
|
|
||||||
case R.string.nav_profile:
|
|
||||||
case R.string.nav_public_activities:
|
|
||||||
case R.string.pref_title__intellihide_toolbars: {
|
case R.string.pref_title__intellihide_toolbars: {
|
||||||
activityRestartRequired = true;
|
activityRestartRequired = true;
|
||||||
return true;
|
return true;
|
||||||
|
@ -144,6 +135,10 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(preference.getKey() != null && preference.getKey().startsWith("pref_key__visibility_nav__")) {
|
||||||
|
activityRestartRequired = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
@ -154,6 +149,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
|
Log.d(App.TAG, "Settings onStop" + activityRestartRequired);
|
||||||
super.onStop();
|
super.onStop();
|
||||||
if (activityRestartRequired){
|
if (activityRestartRequired){
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
|
|
Loading…
Reference in a new issue