Improves the timeline
This commit is contained in:
parent
e0c3845a9b
commit
fa65142033
|
@ -1771,7 +1771,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.LOCAL);
|
||||
statusFragment.setArguments(bundle);
|
||||
return statusFragment;
|
||||
}else if (position == 3 && display_global && display_direct){
|
||||
}else if (position == 3 && display_global && !display_direct){
|
||||
statusFragment = new DisplayStatusFragment();
|
||||
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.PUBLIC);
|
||||
statusFragment.setArguments(bundle);
|
||||
|
|
|
@ -271,6 +271,25 @@ 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);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
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);
|
||||
|
@ -286,6 +305,28 @@ public class SettingsFragment extends Fragment {
|
|||
getActivity().recreate();
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
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, CHANGE_THEME_INTENT);
|
||||
if(getActivity() != null)
|
||||
getActivity().finish();
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
@ -327,24 +368,6 @@ public class SettingsFragment extends Fragment {
|
|||
|
||||
|
||||
|
||||
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, CHANGE_THEME_INTENT);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
boolean capitalize = sharedpreferences.getBoolean(Helper.SET_CAPITALIZE, true);
|
||||
final CheckBox set_capitalize = rootView.findViewById(R.id.set_capitalize);
|
||||
|
|
|
@ -59,6 +59,11 @@
|
|||
android:text="@string/set_auto_store_toot"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_direct"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_direct"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_local"
|
||||
|
|
|
@ -59,7 +59,12 @@
|
|||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_direct"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_direct"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_local"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -634,6 +634,7 @@
|
|||
<string name="retrieve_remote_status">Fetching remote status</string>
|
||||
<string name="comment">Comment</string>
|
||||
<string name="peertube_instance">Peertube instance</string>
|
||||
<string name="set_display_direct">Display private messages timeline</string>
|
||||
|
||||
<string-array name="filter_expire">
|
||||
<item>Never</item>
|
||||
|
|
Loading…
Reference in New Issue