|
@@ -601,6 +601,9 @@
|
|
- (void)refreshChatLogNotif:(NSNotification *)notif {
|
|
- (void)refreshChatLogNotif:(NSNotification *)notif {
|
|
self.isGetServerMsg = NO;
|
|
self.isGetServerMsg = NO;
|
|
[_array removeAllObjects];
|
|
[_array removeAllObjects];
|
|
|
|
+
|
|
|
|
+ [g_server roomGetRoom:self.roomId toView:self];
|
|
|
|
+
|
|
[self refresh:nil];
|
|
[self refresh:nil];
|
|
[self.tableView reloadData];
|
|
[self.tableView reloadData];
|
|
}
|
|
}
|
|
@@ -865,6 +868,7 @@
|
|
[_floating setContent:[UIImage imageNamed:@"sidaiDD"] contentType:MISFloatingBallContentTypeImage];
|
|
[_floating setContent:[UIImage imageNamed:@"sidaiDD"] contentType:MISFloatingBallContentTypeImage];
|
|
_floating.edgePolicy = MISFloatingBallEdgePolicyLeftRight;
|
|
_floating.edgePolicy = MISFloatingBallEdgePolicyLeftRight;
|
|
[_floating show];
|
|
[_floating show];
|
|
|
|
+ _floating.hidden=YES;
|
|
__weak __typeof(self)weakSelf = self;
|
|
__weak __typeof(self)weakSelf = self;
|
|
_floating.clickHandler = ^(MISFloatingBall * _Nonnull floatingBall) {
|
|
_floating.clickHandler = ^(MISFloatingBall * _Nonnull floatingBall) {
|
|
//[g_server getAppResource:@"5" ToView:weakSelf];
|
|
//[g_server getAppResource:@"5" ToView:weakSelf];
|
|
@@ -1137,7 +1141,7 @@
|
|
-(void)refresh:(JXMessageObject*)msg
|
|
-(void)refresh:(JXMessageObject*)msg
|
|
{
|
|
{
|
|
_isRefreshing = YES;
|
|
_isRefreshing = YES;
|
|
- if (self.courseId.length > 0) {
|
|
|
|
|
|
+ if (_courseId.length > 0) {
|
|
NSMutableArray *arr = [NSMutableArray array];
|
|
NSMutableArray *arr = [NSMutableArray array];
|
|
for (NSDictionary *dict in self.courseArray) {
|
|
for (NSDictionary *dict in self.courseArray) {
|
|
[arr addObject:dict[@"message"]];
|
|
[arr addObject:dict[@"message"]];
|
|
@@ -1253,7 +1257,7 @@
|
|
// }];
|
|
// }];
|
|
// NSNumber *time = [sortedArray lastObject];
|
|
// NSNumber *time = [sortedArray lastObject];
|
|
// starTime = [time longValue];
|
|
// starTime = [time longValue];
|
|
-
|
|
|
|
|
|
+ // [g_server tigaseMucMsgsWithRoomId:s StartTime:604800000 EndTime:endTime PageIndex:0 PageSize:PAGECOUNT toView:self];
|
|
if([_roomJid length]>0){
|
|
if([_roomJid length]>0){
|
|
[g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:0 PageSize:PAGECOUNT toView:self];
|
|
[g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:0 PageSize:PAGECOUNT toView:self];
|
|
}
|
|
}
|
|
@@ -1274,10 +1278,27 @@
|
|
|
|
|
|
JXSynTask *task = _taskList.firstObject;
|
|
JXSynTask *task = _taskList.firstObject;
|
|
if (self.roomJid.length > 0 && task) {
|
|
if (self.roomJid.length > 0 && task) {
|
|
-
|
|
|
|
- p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];
|
|
|
|
|
|
+ //获取某联系人所有聊天记录
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ NSString *messageLenth=[g_default objectForKey:@"messageHistory"];
|
|
|
|
+ if (messageLenth.length>0) {
|
|
|
|
+
|
|
|
|
+ p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ [g_default setObject:@"messageHistory" forKey:@"messageHistory"];
|
|
|
|
+ [g_default synchronize];
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
+ NSLog(@"task.endTime %@",task.endTime);
|
|
|
|
+ //获取某联系人聊天记录
|
|
|
|
+ //-(NSMutableArray*)fetchAllMessageListWithUser:(NSString *)userId;
|
|
}else {
|
|
}else {
|
|
NSString* myUserId = MY_USER_ID;
|
|
NSString* myUserId = MY_USER_ID;
|
|
double createTime = 0;
|
|
double createTime = 0;
|
|
@@ -1288,7 +1309,22 @@
|
|
createTime = mdata.createTime;
|
|
createTime = mdata.createTime;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];
|
|
|
|
|
|
+
|
|
|
|
+ NSString *messageLenth=[g_default objectForKey:@"messageHistory"];
|
|
|
|
+ if (messageLenth.length>0) {
|
|
|
|
+
|
|
|
|
+ p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ [g_default setObject:@"messageHistory" forKey:@"messageHistory"];
|
|
|
|
+ [g_default synchronize];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (_array.count <= 0 &&(!p || p.count <= 0) && (!self.roomJid || self.roomJid.length <= 0)) {
|
|
if (_array.count <= 0 &&(!p || p.count <= 0) && (!self.roomJid || self.roomJid.length <= 0)) {
|
|
self.isGetServerMsg = YES;
|
|
self.isGetServerMsg = YES;
|
|
@@ -1298,6 +1334,7 @@
|
|
|
|
|
|
bPull = (p && p.count > 0);
|
|
bPull = (p && p.count > 0);
|
|
}else {
|
|
}else {
|
|
|
|
+ ////获取某联系人所有聊天记录
|
|
p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
|
|
p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
|
|
[_array removeAllObjects];
|
|
[_array removeAllObjects];
|
|
bPull = NO;
|
|
bPull = NO;
|
|
@@ -1305,9 +1342,9 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- for (JXMessageObject *msg in p) {
|
|
|
|
- allHeight += [msg.chatMsgHeight floatValue];
|
|
|
|
- }
|
|
|
|
|
|
+// for (JXMessageObject *msg in p) {
|
|
|
|
+// allHeight += [msg.chatMsgHeight floatValue];
|
|
|
|
+// }
|
|
|
|
|
|
self.isGetServerMsg = !bPull;
|
|
self.isGetServerMsg = !bPull;
|
|
|
|
|
|
@@ -1359,15 +1396,15 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
[_pool removeAllObjects];
|
|
[_pool removeAllObjects];
|
|
_refreshCount++;
|
|
_refreshCount++;
|
|
|
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
//刷新完成
|
|
//刷新完成
|
|
if (self.scrollLine > 0) {
|
|
if (self.scrollLine > 0) {
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
|
|
[_table reloadData];
|
|
[_table reloadData];
|
|
- [self scrollToCurrentLine];
|
|
|
|
|
|
+ // [self scrollToCurrentLine];
|
|
_isRefreshing = NO;
|
|
_isRefreshing = NO;
|
|
- });
|
|
|
|
|
|
+// });
|
|
}else {
|
|
}else {
|
|
if(msg || _page == 0){
|
|
if(msg || _page == 0){
|
|
[_table reloadData];
|
|
[_table reloadData];
|
|
@@ -1379,11 +1416,11 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
if([_array count]>0){
|
|
if([_array count]>0){
|
|
- [_table gotoLastRow:NO];
|
|
|
|
|
|
+ // [_table gotoLastRow:NO];
|
|
[_table reloadData];
|
|
[_table reloadData];
|
|
// [_table gotoRow: (int)(_array.count - firstNum + 2)];
|
|
// [_table gotoRow: (int)(_array.count - firstNum + 2)];
|
|
// [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(int)(_array.count - firstNum) inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
|
|
// [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(int)(_array.count - firstNum) inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
|
|
- _table.contentOffset = CGPointMake(0, allHeight);
|
|
|
|
|
|
+ // _table.contentOffset = CGPointMake(0, allHeight);
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1392,10 +1429,12 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
_isRefreshing = NO;
|
|
_isRefreshing = NO;
|
|
}
|
|
}
|
|
|
|
|
|
- });
|
|
|
|
|
|
+// });
|
|
|
|
|
|
}else {
|
|
}else {
|
|
- _isRefreshing = NO;//[_table gotoLastRow:NO];
|
|
|
|
|
|
+ _isRefreshing = NO;//
|
|
|
|
+
|
|
|
|
+ //[_table gotoLastRow:NO];
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1412,6 +1451,25 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
- (void) customView {
|
|
- (void) customView {
|
|
[self createHeadAndFoot];
|
|
[self createHeadAndFoot];
|
|
self.tableFooter.clipsToBounds = YES;
|
|
self.tableFooter.clipsToBounds = YES;
|
|
|
|
+
|
|
|
|
+ if ([_groupStatus intValue]==1) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ UIAlertView *uialertShow = [[UIAlertView alloc] initWithTitle:Localized(@"JX_OutOfTheGroup1") message:nil delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
|
|
|
|
+ uialertShow.tag=20000000;
|
|
|
|
+ [uialertShow show];
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }else if ([self.groupStatus intValue]==2){
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ UIAlertView *uialertShow = [[UIAlertView alloc] initWithTitle:Localized(@"JX_DissolutionGroup1") message:nil delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
|
|
|
|
+ uialertShow.tag=30000000;
|
|
|
|
+ [uialertShow show];
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
// 设置聊天背景图片
|
|
// 设置聊天背景图片
|
|
// self.backGroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT - JX_SCREEN_BOTTOM)];
|
|
// self.backGroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT - JX_SCREEN_BOTTOM)];
|
|
// self.backGroundImageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
// self.backGroundImageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
@@ -1465,7 +1523,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
_moreView =[JXSelectImageView alloc];
|
|
_moreView =[JXSelectImageView alloc];
|
|
_moreView.isDevice = [self.chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound;
|
|
_moreView.isDevice = [self.chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound;
|
|
_moreView.delegate = self;
|
|
_moreView.delegate = self;
|
|
- _moreView.isGroupMessages = self.isGroupMessages;
|
|
|
|
|
|
+ _moreView.data=data;
|
|
|
|
+ _moreView.isGroupMessages = _isGroupMessages;
|
|
_moreView.isGroup = _roomJid.length > 0;
|
|
_moreView.isGroup = _roomJid.length > 0;
|
|
_moreView.isWin = [data.role intValue] == 1;
|
|
_moreView.isWin = [data.role intValue] == 1;
|
|
_moreView.onImage = @selector(pickPhoto);
|
|
_moreView.onImage = @selector(pickPhoto);
|
|
@@ -1506,7 +1565,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
UIButton* btn;
|
|
UIButton* btn;
|
|
UIButton *btn1;
|
|
UIButton *btn1;
|
|
- if(self.roomJid){
|
|
|
|
|
|
+ if(_roomJid){
|
|
btn1 = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH-18-BTN_RANG_UP*2, JX_SCREEN_TOP -18-BTN_RANG_UP*2, 18+BTN_RANG_UP*2, 18+BTN_RANG_UP*2)];
|
|
btn1 = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH-18-BTN_RANG_UP*2, JX_SCREEN_TOP -18-BTN_RANG_UP*2, 18+BTN_RANG_UP*2, 18+BTN_RANG_UP*2)];
|
|
[btn1 addTarget:self action:@selector(onMember) forControlEvents:UIControlEventTouchUpInside];
|
|
[btn1 addTarget:self action:@selector(onMember) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.tableHeader addSubview:btn1];
|
|
[self.tableHeader addSubview:btn1];
|
|
@@ -1976,7 +2035,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
|
|
|
|
// [g_notify addObserver:self selector:@selector(deleRoom) name:@"act_roomMemberDeljieshan" object:nil];
|
|
// [g_notify addObserver:self selector:@selector(deleRoom) name:@"act_roomMemberDeljieshan" object:nil];
|
|
-// [g_notify addObserver:self selector:@selector(deleRoom) name:@"deleRoom" object:nil];
|
|
|
|
|
|
+// [g_notify :self selector:@selector(deleRoom) name:@"deleRoom" object:nil];
|
|
|
|
|
|
// [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
|
|
// [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
|
|
// [self.navigationController popViewControllerAnimated:YES];
|
|
// [self.navigationController popViewControllerAnimated:YES];
|
|
@@ -1993,51 +2052,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
//
|
|
//
|
|
// [self refresh:nil];
|
|
// [self refresh:nil];
|
|
// });
|
|
// });
|
|
-
|
|
|
|
- BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
|
|
|
|
-
|
|
|
|
- BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
|
|
|
|
-
|
|
|
|
- if (isOpen==1 && isOpen2==1) {
|
|
|
|
- _noticeView2.hidden = YES;
|
|
|
|
- _noticeViewScrollView.hidden = YES;
|
|
|
|
-
|
|
|
|
- }else if (isOpen==1 && isOpen2==0) {
|
|
|
|
-
|
|
|
|
- // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);
|
|
|
|
- _noticeViewScrollView.hidden = NO;
|
|
|
|
- _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
|
|
- _noticeView2.hidden = YES;_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
|
|
- }else if (isOpen==0 && isOpen2==1){
|
|
|
|
-
|
|
|
|
- if ( _biaotishifoBC==1111) {
|
|
|
|
-
|
|
|
|
- _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
|
|
- // self.showTopView.xiaLineView.hidden=NO;
|
|
|
|
- _noticeView2.hidden = NO;
|
|
|
|
- self.showTopView.xiaLineView.hidden=NO;
|
|
|
|
- }else{
|
|
|
|
-
|
|
|
|
- _noticeView2.hidden = YES;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- _noticeViewScrollView.hidden = YES;
|
|
|
|
- }else if (isOpen==0 && isOpen2==0) {
|
|
|
|
- _noticeViewScrollView.hidden = NO;
|
|
|
|
-
|
|
|
|
- self.showTopView.xiaLineView.hidden=YES;
|
|
|
|
- _noticeView2.hidden = NO;
|
|
|
|
- _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
|
|
- _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-// [g_notify removeObserver:self];
|
|
|
|
-
|
|
|
|
- if ([_roomJid length]<=0) {
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- _table.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+
|
|
[self.navigationController setNavigationBarHidden:NO];
|
|
[self.navigationController setNavigationBarHidden:NO];
|
|
|
|
|
|
}
|
|
}
|
|
@@ -2046,6 +2062,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
[super viewDidDisappear:animated];
|
|
[super viewDidDisappear:animated];
|
|
_strURLGoback=@"";
|
|
_strURLGoback=@"";
|
|
|
|
+ [_container dismiss];
|
|
if (_enterFirst==100) {
|
|
if (_enterFirst==100) {
|
|
|
|
|
|
_noticeView2=nil;
|
|
_noticeView2=nil;
|
|
@@ -2154,6 +2171,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
_noticeViewScrollView.backgroundColor=kRGBColor(246, 246, 246);
|
|
_noticeViewScrollView.backgroundColor=kRGBColor(246, 246, 246);
|
|
[self.view addSubview:_noticeViewScrollView];
|
|
[self.view addSubview:_noticeViewScrollView];
|
|
|
|
+ _noticeViewScrollView.hidden=YES;
|
|
|
|
|
|
UIView *lineView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, 1)];
|
|
UIView *lineView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, 1)];
|
|
lineView1.backgroundColor=[UIColor whiteColor];
|
|
lineView1.backgroundColor=[UIColor whiteColor];
|
|
@@ -2323,7 +2341,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
_noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(0, JX_SCREEN_TOP-(JX_SCREEN_HEIGHT>=812?44:20), JX_SCREEN_WIDTH, 38)];
|
|
_noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(0, JX_SCREEN_TOP-(JX_SCREEN_HEIGHT>=812?44:20), JX_SCREEN_WIDTH, 38)];
|
|
_noticeView2.backgroundColor = [UIColor whiteColor];
|
|
_noticeView2.backgroundColor = [UIColor whiteColor];
|
|
[self.view addSubview:_noticeView2];
|
|
[self.view addSubview:_noticeView2];
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
JXtopShowVIew *showTopView=[JXtopShowVIew xibJXtopShowVIew];
|
|
JXtopShowVIew *showTopView=[JXtopShowVIew xibJXtopShowVIew];
|
|
showTopView.frame= _noticeView2.bounds;
|
|
showTopView.frame= _noticeView2.bounds;
|
|
@@ -2361,8 +2379,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
if (selectItem) {
|
|
if (selectItem) {
|
|
//_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
|
|
//_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
|
|
- _noticeView2.hidden = NO;
|
|
|
|
- _noticeViewScrollView.hidden = YES;
|
|
|
|
|
|
+// _noticeView2.hidden = NO;
|
|
|
|
+// _noticeViewScrollView.hidden = YES;
|
|
NSArray *temp = [selectItem componentsSeparatedByString:@"-"];
|
|
NSArray *temp = [selectItem componentsSeparatedByString:@"-"];
|
|
//NSString *first = temp.firstObject;
|
|
//NSString *first = temp.firstObject;
|
|
NSString *last = temp.lastObject;
|
|
NSString *last = temp.lastObject;
|
|
@@ -2373,8 +2391,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
[showTopView.caizongBtn setTitle:[NSString stringWithFormat:@"%@:",titleName] forState:(UIControlStateNormal)];
|
|
[showTopView.caizongBtn setTitle:[NSString stringWithFormat:@"%@:",titleName] forState:(UIControlStateNormal)];
|
|
}else {
|
|
}else {
|
|
|
|
|
|
- _noticeViewScrollView.hidden = NO;
|
|
|
|
- _noticeView2.hidden = YES;
|
|
|
|
|
|
+// _noticeViewScrollView.hidden = NO;
|
|
|
|
+// _noticeView2.hidden = YES;
|
|
|
|
|
|
[showTopView.caizongBtn setTitle:@"开奖结果" forState:(UIControlStateNormal)];
|
|
[showTopView.caizongBtn setTitle:@"开奖结果" forState:(UIControlStateNormal)];
|
|
}
|
|
}
|
|
@@ -2422,9 +2440,9 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
|
|
|
|
if (allGroupAnnouncement == nil) {
|
|
if (allGroupAnnouncement == nil) {
|
|
- _noticeView2.hidden = YES;
|
|
|
|
|
|
+// _noticeView2.hidden = YES;
|
|
}else {
|
|
}else {
|
|
- _noticeView2.hidden = NO;
|
|
|
|
|
|
+// _noticeView2.hidden = NO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2520,9 +2538,14 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
// 跳转到新消息
|
|
// 跳转到新消息
|
|
- (void)jumpNewMsgBtnAction {
|
|
- (void)jumpNewMsgBtnAction {
|
|
- NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0];
|
|
|
|
- [self.tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];
|
|
|
|
- _jumpNewMsgBtn.hidden = YES;
|
|
|
|
|
|
+ try {
|
|
|
|
+ NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0];
|
|
|
|
+ [self.tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];
|
|
|
|
+ _jumpNewMsgBtn.hidden = YES;
|
|
|
|
+ } catch (NSException *error) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
- (void)screenShotViewAction:(UITapGestureRecognizer *)tap {
|
|
- (void)screenShotViewAction:(UITapGestureRecognizer *)tap {
|
|
@@ -3178,12 +3201,14 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
self.isSelectMore = NO;
|
|
self.isSelectMore = NO;
|
|
[self actionQuit];
|
|
[self actionQuit];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//退出群聊
|
|
- (void)delFriend:(NSNotification *)notif {
|
|
- (void)delFriend:(NSNotification *)notif {
|
|
JXUserObject* user = (JXUserObject *)notif.object;
|
|
JXUserObject* user = (JXUserObject *)notif.object;
|
|
|
|
|
|
if ([chatPerson.userId isEqualToString:user.userId]) {
|
|
if ([chatPerson.userId isEqualToString:user.userId]) {
|
|
- [self actionQuit];
|
|
|
|
|
|
+ //[self actionQuit];
|
|
|
|
+
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3221,7 +3246,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
}
|
|
}
|
|
|
|
|
|
- (void)dealloc {
|
|
- (void)dealloc {
|
|
-
|
|
|
|
|
|
+ [g_default removeObjectForKey:@"messageHistory"];
|
|
[g_notify removeObserver:self];
|
|
[g_notify removeObserver:self];
|
|
[g_notify removeObserver:self name:kCellShowCardNotifaction object:nil];
|
|
[g_notify removeObserver:self name:kCellShowCardNotifaction object:nil];
|
|
[g_notify removeObserver:self name:kCellLocationNotifaction object:nil];
|
|
[g_notify removeObserver:self name:kCellLocationNotifaction object:nil];
|
|
@@ -4916,6 +4941,17 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
if(msg==nil)
|
|
if(msg==nil)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+// if ([msg.fromUserName isEqualToString:_recordFromUserName]&&[msg.fromUserName isEqualToString:_recordFromUserName]) {
|
|
|
|
+//
|
|
|
|
+// }else{
|
|
|
|
+
|
|
|
|
+// [g_server roomGetRoom:self.roomId toView:self];
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+// [g_server getRoomMember:roomId userId:[g_myself.userId intValue] toView:self];
|
|
|
|
+//
|
|
|
|
+// _recordFromUserName=msg.fromUserName;
|
|
|
|
+// _recordFromUseId=msg.fromUserId;
|
|
// 更新title 在线状态
|
|
// 更新title 在线状态
|
|
if (!self.roomJid && !self.onlinestate && ![msg.fromUserId isEqualToString:MY_USER_ID]) {
|
|
if (!self.roomJid && !self.onlinestate && ![msg.fromUserId isEqualToString:MY_USER_ID]) {
|
|
self.onlinestate = YES;
|
|
self.onlinestate = YES;
|
|
@@ -5045,6 +5081,11 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
[self showOneMsg:msg];
|
|
[self showOneMsg:msg];
|
|
}
|
|
}
|
|
msg = nil;
|
|
msg = nil;
|
|
|
|
+
|
|
|
|
+ if ([msg.type intValue]==10) {
|
|
|
|
+
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
-(void)newReceipt:(NSNotification *)notifacation{//新回执
|
|
-(void)newReceipt:(NSNotification *)notifacation{//新回执
|
|
@@ -7769,7 +7810,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
else
|
|
else
|
|
s = chatPerson.userId;
|
|
s = chatPerson.userId;
|
|
[[JXMessageObject sharedInstance] getHistory:array1 userId:s];
|
|
[[JXMessageObject sharedInstance] getHistory:array1 userId:s];
|
|
-
|
|
|
|
|
|
+ //_array;
|
|
if (self.roomJid && _taskList.count > 0) {
|
|
if (self.roomJid && _taskList.count > 0) {
|
|
JXSynTask *task = _taskList.firstObject;
|
|
JXSynTask *task = _taskList.firstObject;
|
|
if (array1.count < PAGECOUNT) {
|
|
if (array1.count < PAGECOUNT) {
|
|
@@ -7807,7 +7848,9 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
[self setIsShowTime];[_table reloadData];
|
|
[self setIsShowTime];[_table reloadData];
|
|
*/
|
|
*/
|
|
|
|
|
|
- [self refresh:nil];
|
|
|
|
|
|
+ [self refresh:nil];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
NSLog(@"JXSynTask ^刷新");
|
|
NSLog(@"JXSynTask ^刷新");
|
|
@@ -7942,11 +7985,21 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
}
|
|
}
|
|
|
|
|
|
if ([aDownload.action isEqualToString:act_roomGetRoom]) {
|
|
if ([aDownload.action isEqualToString:act_roomGetRoom]) {
|
|
-
|
|
|
|
|
|
+
|
|
BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
|
|
BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
|
|
|
|
|
|
BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
|
|
BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
|
|
-
|
|
|
|
|
|
+ _lotterInt=[dict[@"lottery"] intValue];
|
|
|
|
+ if ([dict[@"lottery"] intValue]==1) {
|
|
|
|
+ _floating.hidden=NO;
|
|
|
|
+ }else{
|
|
|
|
+ _floating.hidden=YES;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if ([dict[@"lottery"] intValue]==1) {
|
|
if ([dict[@"lottery"] intValue]==1) {
|
|
|
|
|
|
|
|
|
|
@@ -7960,7 +8013,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
_noticeViewScrollView.hidden = NO;
|
|
_noticeViewScrollView.hidden = NO;
|
|
|
|
|
|
_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
- _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
|
|
|
|
+ _noticeViewScrollView.frame=CGRectMake(0, 44, JX_SCREEN_WIDTH, 37);
|
|
|
|
|
|
}else if (isOpen==0 && isOpen2==1){
|
|
}else if (isOpen==0 && isOpen2==1){
|
|
_noticeView2.hidden = NO;
|
|
_noticeView2.hidden = NO;
|
|
@@ -7969,7 +8022,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
_noticeViewScrollView.hidden = YES;
|
|
_noticeViewScrollView.hidden = YES;
|
|
}else if (isOpen==0 && isOpen2==0) {
|
|
}else if (isOpen==0 && isOpen2==0) {
|
|
_noticeViewScrollView.hidden = NO;
|
|
_noticeViewScrollView.hidden = NO;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ _noticeViewScrollView.hidden = NO;
|
|
self.showTopView.xiaLineView.hidden=YES;
|
|
self.showTopView.xiaLineView.hidden=YES;
|
|
_noticeView2.hidden = NO;
|
|
_noticeView2.hidden = NO;
|
|
_noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
_noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
@@ -8940,19 +8994,30 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
s = nil;
|
|
s = nil;
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
|
|
+ {
|
|
s = Localized(@"JX_OutOfTheGroup1");
|
|
s = Localized(@"JX_OutOfTheGroup1");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
break;
|
|
break;
|
|
|
|
+ }
|
|
case 2:
|
|
case 2:
|
|
|
|
+ {
|
|
s = Localized(@"JX_DissolutionGroup1");
|
|
s = Localized(@"JX_DissolutionGroup1");
|
|
|
|
+
|
|
|
|
+
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ }
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
if (s.length > 0) {
|
|
if (s.length > 0) {
|
|
[self hideKeyboard:NO];
|
|
[self hideKeyboard:NO];
|
|
- [g_server showMsg:s];
|
|
|
|
|
|
+ [g_server showMsg:s];
|
|
|
|
+
|
|
|
|
+
|
|
}else {
|
|
}else {
|
|
// [_wait start];
|
|
// [_wait start];
|
|
|
|
|
|
@@ -8962,6 +9027,94 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
vc.roomId = roomId;
|
|
vc.roomId = roomId;
|
|
vc.room = self.room;
|
|
vc.room = self.room;
|
|
vc.delegate = self;
|
|
vc.delegate = self;
|
|
|
|
+ vc.guanxinCoseBlock = ^(BOOL guanxinCose) {
|
|
|
|
+
|
|
|
|
+ BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
|
|
|
|
+
|
|
|
|
+ BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
|
|
|
|
+
|
|
|
|
+ if (_lotterInt==1&&isOpen==0) {
|
|
|
|
+ if (isOpen2==0) {
|
|
|
|
+
|
|
|
|
+ self.showTopView.xiaLineView.hidden=YES;
|
|
|
|
+ _noticeViewScrollView.hidden=NO;
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ self.showTopView.xiaLineView.hidden=NO;
|
|
|
|
+ _noticeViewScrollView.hidden=YES;
|
|
|
|
+ }
|
|
|
|
+ _noticeView2.hidden = NO;
|
|
|
|
+ _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
|
|
+
|
|
|
|
+ _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ _noticeView2.hidden = YES;
|
|
|
|
+
|
|
|
|
+ if (isOpen2==0) {
|
|
|
|
+ _noticeViewScrollView.hidden=NO;
|
|
|
|
+ _noticeViewScrollView.frame=CGRectMake(0, 0, JX_SCREEN_WIDTH, 37);
|
|
|
|
+
|
|
|
|
+ _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ _noticeViewScrollView.hidden=YES;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+ vc.resultBlock = ^(BOOL resultClose) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
|
|
|
|
+ BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
|
|
|
|
+
|
|
|
|
+ if (_lotterInt==1&&isOpen==0) {
|
|
|
|
+
|
|
|
|
+ if (isOpen2==0) {
|
|
|
|
+
|
|
|
|
+ self.showTopView.xiaLineView.hidden=YES;
|
|
|
|
+ _noticeViewScrollView.hidden = NO;
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ self.showTopView.xiaLineView.hidden=NO;
|
|
|
|
+ _noticeViewScrollView.hidden = YES;
|
|
|
|
+ }
|
|
|
|
+ _noticeView2.hidden = NO;
|
|
|
|
+ _noticeViewScrollView.hidden = NO;
|
|
|
|
+ _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
|
|
|
|
+ _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ _noticeView2.hidden = YES;
|
|
|
|
+
|
|
|
|
+ if (isOpen2==0) {
|
|
|
|
+ _noticeViewScrollView.hidden = NO;
|
|
|
|
+ _noticeViewScrollView.frame=CGRectMake(0, 44, JX_SCREEN_WIDTH, 37);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
|
|
|
|
+ }else{
|
|
|
|
+ _noticeViewScrollView.hidden = YES;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // [g_notify removeObserver:self];
|
|
|
|
+
|
|
vc = [vc init];
|
|
vc = [vc init];
|
|
// [g_window addSubview:vc.view];
|
|
// [g_window addSubview:vc.view];
|
|
[g_navigation pushViewController:vc animated:YES];
|
|
[g_navigation pushViewController:vc animated:YES];
|
|
@@ -8994,7 +9147,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
if([p.type intValue] == kRoomRemind_DelMember){
|
|
if([p.type intValue] == kRoomRemind_DelMember){
|
|
if([p.toUserId isEqualToString:MY_USER_ID])
|
|
if([p.toUserId isEqualToString:MY_USER_ID])
|
|
self.groupStatus = [NSNumber numberWithInt:1];
|
|
self.groupStatus = [NSNumber numberWithInt:1];
|
|
-// [self actionQuit];
|
|
|
|
|
|
+// // [self actionQuit];
|
|
|
|
|
|
NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];
|
|
NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];
|
|
self.title = [NSString stringWithFormat:@"%@(%ld)", self.chatPerson.userNickname, memberArray.count];
|
|
self.title = [NSString stringWithFormat:@"%@(%ld)", self.chatPerson.userNickname, memberArray.count];
|
|
@@ -11453,6 +11606,15 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
|
|
|
|
|
|
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
|
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
|
|
|
|
|
|
|
+ if (alertView.tag==30000000) {
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }if (alertView.tag==30000000) {
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (alertView.tag == 2457) {
|
|
if (alertView.tag == 2457) {
|
|
|
|
|
|
if (buttonIndex == 1) {
|
|
if (buttonIndex == 1) {
|