Preview replies can be managed in settings

This commit is contained in:
tom79 2017-08-16 19:10:49 +02:00
parent 19d4faf30a
commit 417cc6bdf7
6 changed files with 27 additions and 1 deletions

View File

@ -213,7 +213,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
holder.status_replies_profile_pictures.removeAllViews();
int i = 0;
for(Status replies: status.getReplies()){
if( i > 5 )
if( i > 4 )
break;
if( !addedPictures.contains(replies.getAccount().getAcct())){
final ImageView imageView = new ImageView(context);

View File

@ -120,6 +120,19 @@ public class SettingsFragment extends Fragment {
}
});
boolean preview_reply = sharedpreferences.getBoolean(Helper.SET_PREVIEW_REPLIES, true);
final CheckBox set_preview_reply = (CheckBox) rootView.findViewById(R.id.set_preview_reply);
set_preview_reply.setChecked(preview_reply);
set_preview_reply.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_PREVIEW_REPLIES, set_preview_reply.isChecked());
editor.apply();
}
});
boolean notif_validation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
final CheckBox set_share_validation = (CheckBox) rootView.findViewById(R.id.set_share_validation);
set_share_validation.setChecked(notif_validation);

View File

@ -58,6 +58,12 @@
android:text="@string/set_auto_store_toot"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_preview_reply"
android:layout_width="wrap_content"
android:text="@string/set_preview_reply"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -58,6 +58,11 @@
android:text="@string/set_auto_store_toot"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_preview_reply"
android:layout_width="wrap_content"
android:text="@string/set_preview_reply"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -295,6 +295,7 @@
<string name="set_profile_description">Présentation…</string>
<string name="set_save_changes">Enregistrer les modifications</string>
<string name="set_header_picture_overlay">Choisissez une image d\'entête</string>
<string name="set_preview_reply">Afficher le nombre de réponses sur la page d\'accueil</string>
<string name="note_no_space">Vous avez atteint les 160 caractères autorisés !</string>
<string name="username_no_space">Vous avez atteint les 30 caractères autorisés !</string>
<string name="settings_title_hour">Plage horaire pour les notifications :</string>

View File

@ -300,6 +300,7 @@
<string name="set_profile_description">Bio…</string>
<string name="set_save_changes">Save changes</string>
<string name="set_header_picture_overlay">Choose a header picture</string>
<string name="set_preview_reply">Display the number of replies in hme timeline</string>
<string name="note_no_space">You have reached the 160 characters allowed!</string>
<string name="username_no_space">You have reached the 30 characters allowed!</string>