修复了设置为管理的时候还需要退出房间才能更新房间话题可编译的状态

This commit is contained in:
fengshuo
2022-03-15 18:38:36 +08:00
parent 19f5da68fe
commit ad5a6d4ad7
6 changed files with 59 additions and 6 deletions

View File

@@ -190,7 +190,35 @@
}
}
}
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
switch (content.eventType) {
case NIMChatroomEventTypeAddManager:
{
for (NIMChatroomNotificationMember * member in content.targets) {
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
self.editButton.hidden = NO;
break;
}
}
}
break;
case NIMChatroomEventTypeRemoveManager:
{
for (NIMChatroomNotificationMember * member in content.targets) {
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
self.editButton.hidden = YES;
break;
}
}
}
break;
default:
break;
}
}
#pragma mark - Event Response
- (void)contributionButtonAction:(UIButton *)sender {
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];