Skip to content

Commit 23ff3c9

Browse files
authored
1 parent 0d9065b commit 23ff3c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/ios/AdaptiveCards/AdaptiveCards/AdaptiveCards/ACRChoiceSetViewDataSource.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ @implementation ACRChoiceSetViewDataSource
1515
std::shared_ptr<ChoiceSetInput> _choiceSetDataSource;
1616
NSMutableDictionary *_userSelections;
1717
NSIndexPath *_lastSelectedIndexPath;
18-
NSSet *_defaultValuesSet;
18+
NSMutableSet *_defaultValuesSet;
1919
NSArray *_defaultValuesArray;
2020
}
2121

@@ -35,7 +35,7 @@ - (instancetype)initWithInputChoiceSet:(std::shared_ptr<AdaptiveCards::ChoiceSet
3535
_defaultValuesArray = [defaultValues componentsSeparatedByCharactersInSet:
3636
[NSCharacterSet characterSetWithCharactersInString:@","]];
3737
if (_isMultiChoicesAllowed || [_defaultValuesArray count] == 1){
38-
_defaultValuesSet = [NSSet setWithArray:_defaultValuesArray];
38+
_defaultValuesSet = [NSMutableSet setWithArray:_defaultValuesArray];
3939
}
4040
}
4141
return self;
@@ -73,6 +73,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
7373

7474
if([_defaultValuesSet containsObject:keyForDefaultValue]){
7575
_userSelections[[NSNumber numberWithInteger:indexPath.row]] = [NSNumber numberWithBool:YES];
76+
[_defaultValuesSet removeObject:keyForDefaultValue];
7677
cell.accessoryType = UITableViewCellAccessoryCheckmark;
7778
} else {
7879
cell.accessoryType = UITableViewCellAccessoryNone;

0 commit comments

Comments
 (0)