|
@@ -134,6 +134,9 @@
|
|
|
NSMutableArray *subjectModelArray = [NSMutableArray array];
|
|
|
for (NSDictionary *dic in subjects) {
|
|
|
InstrumentMessageModel *model = [[InstrumentMessageModel alloc] initWithDictionary:dic];
|
|
|
+ if ([model.internalBaseClassIdentifier isEqualToString:self.preSubjectId]) {
|
|
|
+ model.isChoose = YES;
|
|
|
+ }
|
|
|
[subjectModelArray addObject:model];
|
|
|
}
|
|
|
[instrumentArray addObject:subjectModelArray];
|
|
@@ -181,6 +184,11 @@
|
|
|
|
|
|
- (void)countMessageWithModel:(InstrumentMessageModel *)model indexPath:(NSIndexPath *)indexPath {
|
|
|
if (model.isChoose) {
|
|
|
+ // 取消上一个选中
|
|
|
+ if (self.chooseModel) {
|
|
|
+ self.chooseModel.isChoose = NO;
|
|
|
+ [self.collectionView reloadItemsAtIndexPaths:@[indexPath,self.chooseIndexPath]];
|
|
|
+ }
|
|
|
self.chooseModel = model;
|
|
|
self.chooseIndexPath = indexPath;
|
|
|
}
|