修复bug
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
///Tool
|
///Tool
|
||||||
#import "UIImage+Utils.h"
|
#import "UIImage+Utils.h"
|
||||||
NSString *const adImageName = @"adImageName";
|
NSString *const adImageName = @"adImageName";
|
||||||
NSString *const adUrl = @"adUrl";
|
|
||||||
// 广告显示的时间
|
// 广告显示的时间
|
||||||
static int const showtime = 3;
|
static int const showtime = 3;
|
||||||
|
|
||||||
|
@@ -645,7 +645,11 @@
|
|||||||
|
|
||||||
[[NIMSDK sharedSDK].conversationManager markAllMessagesReadInSession:self.session];
|
[[NIMSDK sharedSDK].conversationManager markAllMessagesReadInSession:self.session];
|
||||||
}
|
}
|
||||||
|
- (void)onRecvRevokeMessageNotification:(NIMRevokeMessageNotification *)notification{
|
||||||
|
|
||||||
|
|
||||||
|
[[NIMSDK sharedSDK].conversationManager deleteMessage:notification.message];
|
||||||
|
}
|
||||||
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {
|
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {
|
||||||
if (message.session.sessionType != NIMSessionTypeP2P) {
|
if (message.session.sessionType != NIMSessionTypeP2P) {
|
||||||
return;
|
return;
|
||||||
|
@@ -27,7 +27,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
|||||||
|
|
||||||
#import <Masonry/Masonry.h>
|
#import <Masonry/Masonry.h>
|
||||||
|
|
||||||
@interface SessionListViewController ()<UITableViewDataSource, UITableViewDelegate, NIMLoginManagerDelegate, NIMConversationManagerDelegate, XPSessionListHeadViewDelegate>
|
@interface SessionListViewController ()<UITableViewDataSource, UITableViewDelegate, NIMLoginManagerDelegate, NIMConversationManagerDelegate, XPSessionListHeadViewDelegate,NIMChatManagerDelegate>
|
||||||
|
|
||||||
@property (nonatomic, strong) XPSessionListHeadView *headView;
|
@property (nonatomic, strong) XPSessionListHeadView *headView;
|
||||||
/**
|
/**
|
||||||
@@ -54,6 +54,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
|||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[[NIMSDK sharedSDK].conversationManager removeDelegate:self];
|
[[NIMSDK sharedSDK].conversationManager removeDelegate:self];
|
||||||
[[NIMSDK sharedSDK].loginManager removeDelegate:self];
|
[[NIMSDK sharedSDK].loginManager removeDelegate:self];
|
||||||
|
[[NIMSDK sharedSDK].chatManager removeDelegate:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isHiddenNavBar {
|
- (BOOL)isHiddenNavBar {
|
||||||
@@ -98,6 +99,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
|||||||
[self initDatas];
|
[self initDatas];
|
||||||
[[NIMSDK sharedSDK].conversationManager addDelegate:self];
|
[[NIMSDK sharedSDK].conversationManager addDelegate:self];
|
||||||
[[NIMSDK sharedSDK].loginManager addDelegate:self];
|
[[NIMSDK sharedSDK].loginManager addDelegate:self];
|
||||||
|
[[NIMSDK sharedSDK].chatManager addDelegate:self];
|
||||||
///置顶会话同步
|
///置顶会话同步
|
||||||
[[NIMSDKConfig sharedConfig] setShouldSyncStickTopSessionInfos:YES];
|
[[NIMSDKConfig sharedConfig] setShouldSyncStickTopSessionInfos:YES];
|
||||||
}
|
}
|
||||||
@@ -293,7 +295,15 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
|||||||
[self.sessionListView reloadData];
|
[self.sessionListView reloadData];
|
||||||
[self setTabBarItemBadge:totalUnreadCount];
|
[self setTabBarItemBadge:totalUnreadCount];
|
||||||
}
|
}
|
||||||
|
- (void)onRecvRevokeMessageNotification:(NIMRevokeMessageNotification *)notification{
|
||||||
|
for (NIMRecentSession *recent in self.recentSessions) {
|
||||||
|
if ([recent.session.sessionId isEqualToString:notification.session.sessionId]) {
|
||||||
|
id<NIMConversationManager> manager = [[NIMSDK sharedSDK] conversationManager];
|
||||||
|
[manager deleteRecentSession:recent];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession
|
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession
|
||||||
totalUnreadCount:(NSInteger)totalUnreadCount {
|
totalUnreadCount:(NSInteger)totalUnreadCount {
|
||||||
if(self.openType != SessionListOpenTypeRoom && [[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) {
|
if(self.openType != SessionListOpenTypeRoom && [[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) {
|
||||||
|
@@ -72,7 +72,8 @@
|
|||||||
self.avatarImageView.imageUrl = avatarUrl;
|
self.avatarImageView.imageUrl = avatarUrl;
|
||||||
self.nickLabel.text = user.userInfo.nickName;
|
self.nickLabel.text = user.userInfo.nickName;
|
||||||
[self.nickLabel sizeToFit];
|
[self.nickLabel sizeToFit];
|
||||||
self.contentLabel.text = [NIMMessageUtils messageContent:session.lastMessage];
|
// self.contentLabel.text = [NIMMessageUtils messageContent:session.lastMessage];
|
||||||
|
self.contentLabel.text = @"收到一条新消息";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
_contentLabel = [[UILabel alloc] init];
|
_contentLabel = [[UILabel alloc] init];
|
||||||
_contentLabel.font = [UIFont systemFontOfSize:10];
|
_contentLabel.font = [UIFont systemFontOfSize:10];
|
||||||
_contentLabel.textColor = [ThemeColor mainTextColor];
|
_contentLabel.textColor = [ThemeColor mainTextColor];
|
||||||
|
_contentLabel.adjustsFontSizeToFitWidth = YES;
|
||||||
}
|
}
|
||||||
return _contentLabel;
|
return _contentLabel;
|
||||||
}
|
}
|
||||||
|
@@ -157,7 +157,7 @@
|
|||||||
} roomUid:self.roomUid targetUid:member.userId opt:@"1" isSet:@(NO)];
|
} roomUid:self.roomUid targetUid:member.userId opt:@"1" isSet:@(NO)];
|
||||||
}else{
|
}else{
|
||||||
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
|
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
|
||||||
request.roomId = self.roomUid;
|
request.roomId = self.roomId;
|
||||||
request.userId = member.userId;
|
request.userId = member.userId;
|
||||||
request.enable = NO;
|
request.enable = NO;
|
||||||
[[NIMSDK sharedSDK].chatroomManager markMemberManager:request completion:^(NSError * _Nullable error) {
|
[[NIMSDK sharedSDK].chatroomManager markMemberManager:request completion:^(NSError * _Nullable error) {
|
||||||
|
Reference in New Issue
Block a user