} else {
holder.text1.setText(R.string.text_appearance_theme_custom);
holder.text1.setBackgroundColor(0x0);
holder.text1.setChecked(selectedPosition == -1);
}
<BUG>holder.itemView.setOnClickListener(v -> {
final int which = holder.getAdapterPosition();</BUG>
if (which == getPositionOfCustomColors()) {
activity.startActivityForResult(ColorSettingsActivity.createIntent(Preferences.getBoolean(Prefkey.is_night_mode, false)), reqcodeCustomColors);
return;

} else {
holder.text1.setText(R.string.text_appearance_theme_custom);
holder.text1.setBackgroundColor(0x0);
holder.text1.setChecked(selectedPosition == -1);
}
holder.itemView.setOnClickListener(v -> {
dismissDialog();
final int which = holder.getAdapterPosition();
if (which == getPositionOfCustomColors()) {
activity.startActivityForResult(ColorSettingsActivity.createIntent(Preferences.getBoolean(Prefkey.is_night_mode, false)), reqcodeCustomColors);
return;
