Browse Source

Fix multichoice list items not updating correctly if no pre-selected indices given

Henri Sweers 10 years ago
parent
commit
2bf02361b8

+ 3 - 5
library/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java

@@ -1426,11 +1426,9 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener {
                     break;
                 }
                 case MULTI: {
-                    if (mBuilder.selectedIndices != null) {
-                        @SuppressLint("CutPasteId")
-                        CheckBox checkbox = (CheckBox) view.findViewById(R.id.control);
-                        checkbox.setChecked(selectedIndicesList.contains(index));
-                    }
+                    @SuppressLint("CutPasteId")
+                    CheckBox checkbox = (CheckBox) view.findViewById(R.id.control);
+                    checkbox.setChecked(selectedIndicesList.contains(index));
                     break;
                 }
             }