Remove useless settings

This commit is contained in:
tom79 2019-04-25 18:42:25 +02:00
parent cca48acf27
commit f604d5c270
3 changed files with 0 additions and 177 deletions

View File

@ -798,107 +798,6 @@ public class SettingsFragment extends Fragment {
}
});
boolean display_direct = sharedpreferences.getBoolean(Helper.SET_DISPLAY_DIRECT, true);
final CheckBox set_display_direct = rootView.findViewById(R.id.set_display_direct);
set_display_direct.setChecked(display_direct);
set_display_direct.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_DIRECT, set_display_direct.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean display_local = sharedpreferences.getBoolean(Helper.SET_DISPLAY_LOCAL, true);
final CheckBox set_display_local = rootView.findViewById(R.id.set_display_local);
set_display_local.setChecked(display_local);
set_display_local.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_LOCAL, set_display_local.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean display_global = sharedpreferences.getBoolean(Helper.SET_DISPLAY_GLOBAL, true);
final CheckBox set_display_global = rootView.findViewById(R.id.set_display_global);
set_display_global.setChecked(display_global);
set_display_global.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_GLOBAL, set_display_global.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean display_art = sharedpreferences.getBoolean(Helper.SET_DISPLAY_ART, true);
final CheckBox set_display_art = rootView.findViewById(R.id.set_display_art);
set_display_art.setChecked(display_art);
set_display_art.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_ART, set_display_art.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean display_peertube = sharedpreferences.getBoolean(Helper.SET_DISPLAY_PEERTUBE, true);
final CheckBox set_display_peertube = rootView.findViewById(R.id.set_display_peertube);
set_display_peertube.setChecked(display_peertube);
set_display_peertube.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_PEERTUBE, set_display_peertube.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean disableGif = sharedpreferences.getBoolean(Helper.SET_DISABLE_GIF, false);
final CheckBox set_disable_gif = rootView.findViewById(R.id.set_disable_gif);
set_disable_gif.setChecked(disableGif);

View File

@ -97,44 +97,6 @@
android:layout_weight="1"
android:background="?colorAccent" />
</LinearLayout>
<CheckBox
android:id="@+id/set_display_direct"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_direct"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_local"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_local"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_global"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_global"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_art"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_art"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_peertube"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_peertube"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_old_direct_timeline"

View File

@ -99,44 +99,6 @@
android:layout_weight="1"
android:background="?colorAccent" />
</LinearLayout>
<CheckBox
android:id="@+id/set_display_direct"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_direct"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_local"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_local"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_global"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_global"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_art"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_art"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_peertube"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_peertube"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_old_direct_timeline"