sticker alerts: do not repeat text in title and message

moreover, the "Delete" button is shown as being destructive.
this removes noise and is more consistent with other confirmations.
This commit is contained in:
B. Petersen
2026-03-29 12:36:08 +02:00
committed by biörn
parent d99f150dd2
commit eeb558d94d
2 changed files with 22 additions and 20 deletions
@@ -1034,7 +1034,6 @@ public class ConversationFragment extends MessageSelectorFragment {
@Override
public void onStickerClicked(DcMsg messageRecord) {
new AlertDialog.Builder(getContext())
.setTitle(R.string.add_to_sticker_collection)
.setMessage(R.string.ask_add_sticker_to_collection)
.setPositiveButton(
R.string.ok,
@@ -8,6 +8,7 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
@@ -18,6 +19,7 @@ import java.util.List;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.mms.GlideApp;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.util.Util;
public class StickerPickerView extends RecyclerView {
@@ -130,25 +132,26 @@ public class StickerPickerView extends RecyclerView {
private void deleteSticker(File stickerFile) {
if (stickerFile != null && stickerFile.exists()) {
new androidx.appcompat.app.AlertDialog.Builder(context)
.setTitle(R.string.delete)
.setMessage(R.string.ask_delete_sticker)
.setPositiveButton(
R.string.delete,
(dialog, which) -> {
if (stickerFile.delete()) {
int position = stickerFiles.indexOf(stickerFile);
if (position >= 0) {
stickerFiles.remove(position);
notifyItemRemoved(position);
}
if (listener != null) {
listener.onStickerDeleted(stickerFile);
}
}
})
.setNegativeButton(R.string.cancel, null)
.show();
AlertDialog dialog =
new AlertDialog.Builder(context)
.setMessage(R.string.ask_delete_sticker)
.setPositiveButton(
R.string.delete,
(d, which) -> {
if (stickerFile.delete()) {
int position = stickerFiles.indexOf(stickerFile);
if (position >= 0) {
stickerFiles.remove(position);
notifyItemRemoved(position);
}
if (listener != null) {
listener.onStickerDeleted(stickerFile);
}
}
})
.setNegativeButton(R.string.cancel, null)
.show();
Util.redPositiveButton(dialog);
}
}