Compare commits
4 Commits
enterprise
...
enterprise
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6116d259c2 | ||
![]() |
ae8d0804e1 | ||
![]() |
cab4294e86 | ||
![]() |
80eddb8c3d |
4
Podfile
4
Podfile
@@ -82,6 +82,10 @@ post_install do |installer|
|
||||
project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
|
||||
xcconfig_path = config.base_configuration_reference.real_path
|
||||
xcconfig = File.read(xcconfig_path)
|
||||
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
|
||||
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -345,6 +345,7 @@
|
||||
23E9EB252A84E98300B792F2 /* pi_new_mine_info_online.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */; };
|
||||
23E9EB312A85E5D100B792F2 /* pi_app_logo_new_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */; };
|
||||
23E9EB332A85E97C00B792F2 /* pi_login_new_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */; };
|
||||
23F364322AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */; };
|
||||
23FF255B2AB956D50064E904 /* pi_home_new_pk.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */; };
|
||||
23FF25622ABAE6310064E904 /* pi_room_game_fine_love.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */; };
|
||||
23FF25652ABC3B3C0064E904 /* XPHomeGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF25642ABC3B3B0064E904 /* XPHomeGameView.m */; };
|
||||
@@ -2103,6 +2104,8 @@
|
||||
23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_new_mine_info_online.svga; sourceTree = "<group>"; };
|
||||
23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_app_logo_new_bg.png; sourceTree = "<group>"; };
|
||||
23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_login_new_logo.png; sourceTree = "<group>"; };
|
||||
23F364302AF0A7E000286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "YYTextAsyncLayer+XPTextAsyncLayer.h"; sourceTree = "<group>"; };
|
||||
23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "YYTextAsyncLayer+XPTextAsyncLayer.m"; sourceTree = "<group>"; };
|
||||
23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_home_new_pk.svga; sourceTree = "<group>"; };
|
||||
23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_room_game_fine_love.svga; sourceTree = "<group>"; };
|
||||
23FF25632ABC3B3B0064E904 /* XPHomeGameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeGameView.h; sourceTree = "<group>"; };
|
||||
@@ -6834,6 +6837,8 @@
|
||||
2323E0362ABDAE8F00CCAD2F /* FBSDKSettings+PISDKSettings.m */,
|
||||
E81C27AC26EF39AB0031E639 /* AppDelegate+ThirdConfig.h */,
|
||||
E81C27AD26EF39AB0031E639 /* AppDelegate+ThirdConfig.m */,
|
||||
23F364302AF0A7E000286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.h */,
|
||||
23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */,
|
||||
);
|
||||
path = AppDelegate;
|
||||
sourceTree = "<group>";
|
||||
@@ -11179,6 +11184,7 @@
|
||||
9B044DA0282D32F700DE4859 /* MicroInviteExtModel.m in Sources */,
|
||||
E8D7D74B282BA1EC0007D7BD /* XPMonentsTableViewCell.m in Sources */,
|
||||
E8D34D5A28082357009C4835 /* UserGiftWallInfoModel.m in Sources */,
|
||||
23F364322AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m in Sources */,
|
||||
E82107842987E35300DE7040 /* MessageMonentsAutoModel.m in Sources */,
|
||||
189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */,
|
||||
E83DB4842746661800D8CBD1 /* XPRoomGiftBroadcastView.m in Sources */,
|
||||
@@ -11813,7 +11819,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.10.0;
|
||||
MARKETING_VERSION = 20.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -11848,7 +11854,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.10.0;
|
||||
MARKETING_VERSION = 20.10.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
16
YuMi/Appdelegate/YYTextAsyncLayer+XPTextAsyncLayer.h
Normal file
16
YuMi/Appdelegate/YYTextAsyncLayer+XPTextAsyncLayer.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// YYTextAsyncLayer+XPTextAsyncLayer.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2023/10/28.
|
||||
//
|
||||
|
||||
#import <YYText/YYTextAsyncLayer.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYTextAsyncLayer (XPTextAsyncLayer)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
26
YuMi/Appdelegate/YYTextAsyncLayer+XPTextAsyncLayer.m
Normal file
26
YuMi/Appdelegate/YYTextAsyncLayer+XPTextAsyncLayer.m
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// YYTextAsyncLayer+XPTextAsyncLayer.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2023/10/28.
|
||||
//
|
||||
|
||||
#import "YYTextAsyncLayer+XPTextAsyncLayer.h"
|
||||
|
||||
@implementation YYTextAsyncLayer (XPTextAsyncLayer)
|
||||
///iOS17bug,如果不把方法替换会闪退
|
||||
+(void)load {
|
||||
Method xp_displayMethod = class_getInstanceMethod(self, @selector(display));
|
||||
Method xp_swizzingMethod = class_getInstanceMethod(self, @selector(xp_swizzing_display));
|
||||
method_exchangeImplementations(xp_displayMethod, xp_swizzingMethod);
|
||||
}
|
||||
-(void)xp_swizzing_display{
|
||||
//通过变量名称获取类中的实例成员变量
|
||||
if (self.bounds.size.width <= 0 || self.bounds.size.height <= 0) {
|
||||
self.contents = nil;
|
||||
return;
|
||||
} else {
|
||||
[self xp_swizzing_display];
|
||||
}
|
||||
}
|
||||
@end
|
@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
|
||||
|
||||
|
||||
#define PI_App_Version @"2.1.0"
|
||||
#define PI_App_Version @"2.1.2"
|
||||
#ifdef DEBUG
|
||||
#define API_HOST_URL [NSString stringWithFormat:@"%@%@",@"http://beta.api",@".pekolive.com"]
|
||||
|
||||
|
@@ -1202,18 +1202,19 @@
|
||||
CGFloat scale = image.size.width / image.size.height;
|
||||
imageView.bounds = CGRectMake(0, 0, 18 * scale, 18);
|
||||
} else {
|
||||
NSURL *imgUrl = [NSURL URLWithString:imageName];
|
||||
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
|
||||
if (myImage) {
|
||||
CGFloat scale = myImage.size.width / myImage.size.height;
|
||||
if (scale == 0) {
|
||||
imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
}else {
|
||||
imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
|
||||
}
|
||||
} else {
|
||||
// NSURL *imgUrl = [NSURL URLWithString:imageName];
|
||||
//
|
||||
// UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
|
||||
// if (myImage) {
|
||||
// CGFloat scale = myImage.size.width / myImage.size.height;
|
||||
// if (scale == 0) {
|
||||
// imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
// }else {
|
||||
// imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
|
||||
// }
|
||||
// } else {
|
||||
imageView.bounds = CGRectMake(0, 0, 60, 18);
|
||||
}
|
||||
// }
|
||||
}
|
||||
imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// 铭牌文字
|
||||
|
@@ -74,6 +74,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
///是否是大的 只有在小游戏的时候有用
|
||||
@property (nonatomic,assign) BOOL isLarge;
|
||||
@property(nonatomic,strong) PIRoomPhotoAlbumItemModel *lookUpModel;
|
||||
@property(nonatomic,assign) BOOL isLoadHistoryMessage;
|
||||
@end
|
||||
|
||||
|
||||
@@ -86,6 +87,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.isLoadHistoryMessage = YES;
|
||||
self.hostDelegate = delegate;
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
@@ -286,6 +288,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
#pragma mark - 添加数据并且做自动滚动
|
||||
///添加信息
|
||||
- (void)addRoomMessage:(NIMMessage *)message {
|
||||
if(self.isLoadHistoryMessage == YES)return;
|
||||
[self.incomingMessages addObject:message];
|
||||
if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
@@ -711,78 +714,99 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
option.order = NIMMessageSearchOrderDesc;
|
||||
option.messageTypes = @[@(NIMMessageTypeText)];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray<NIMMessage *> * _Nullable messages) {
|
||||
if (self.datasource.count > kRoomMessageMaxLength) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
|
||||
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
|
||||
[self.datasource removeObjectsInArray:needRemoveMsgArray];
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages.reverseObjectEnumerator) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{///富文本会操作UI,需要回到主线程操作UI,防止加载卡顿
|
||||
if (self.datasource.count > kRoomMessageMaxLength) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
|
||||
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
|
||||
[self.datasource removeObjectsInArray:needRemoveMsgArray];
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages.reverseObjectEnumerator) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
} else {
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
BOOL hideEnter = [self handleHideEnter:message];
|
||||
if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
if (!roomInfo.hasAnimationEffect) {
|
||||
[self roomInfoNoGiftAnimationMessage:message];
|
||||
}
|
||||
[self createUserEnterRoomAddRoomtopicMessage];
|
||||
}];
|
||||
self.isLoadHistoryMessage = NO;
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
BOOL hideEnter = [self handleHideEnter:message];
|
||||
if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
if (!roomInfo.hasAnimationEffect) {
|
||||
[self roomInfoNoGiftAnimationMessage:message];
|
||||
}
|
||||
[self createUserEnterRoomAddRoomtopicMessage];
|
||||
});
|
||||
}];
|
||||
|
||||
return;
|
||||
}
|
||||
if (self.datasource.count > kRoomMessageMaxLength) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
|
||||
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
|
||||
[self.datasource removeObjectsInArray:needRemoveMsgArray];
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (self.datasource.count > kRoomMessageMaxLength) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
|
||||
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
|
||||
[self.datasource removeObjectsInArray:needRemoveMsgArray];
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
} else {
|
||||
[[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
}
|
||||
}
|
||||
self.isLoadHistoryMessage = NO;
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
BOOL hideEnter = [self handleHideEnter:message];
|
||||
if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
if (!roomInfo.hasAnimationEffect) {
|
||||
[self roomInfoNoGiftAnimationMessage:message];
|
||||
}
|
||||
[self createUserEnterRoomAddRoomtopicMessage];
|
||||
});
|
||||
}else{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.isLoadHistoryMessage = NO;
|
||||
BOOL hideEnter = [self handleHideEnter:message];
|
||||
if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
if (!roomInfo.hasAnimationEffect) {
|
||||
[self roomInfoNoGiftAnimationMessage:message];
|
||||
}
|
||||
[self createUserEnterRoomAddRoomtopicMessage];
|
||||
});
|
||||
}
|
||||
BOOL hideEnter = [self handleHideEnter:message];
|
||||
if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
if (!roomInfo.hasAnimationEffect) {
|
||||
[self roomInfoNoGiftAnimationMessage:message];
|
||||
}
|
||||
[self createUserEnterRoomAddRoomtopicMessage];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
@@ -454,7 +454,9 @@
|
||||
//构造会话
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
}
|
||||
} roomUid:roomUid micUid:uid position:position uid:uid];
|
||||
}
|
||||
|
@@ -412,32 +412,32 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
}
|
||||
#pragma mark - 网络状态监听
|
||||
- (void)networkReachability{
|
||||
@kWeakify(self);
|
||||
[[AFNetworkReachabilityManager sharedManager] startMonitoring];
|
||||
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
|
||||
@kStrongify(self);
|
||||
switch (status) {
|
||||
case AFNetworkReachabilityStatusUnknown:
|
||||
self.isFirstReachability = YES;
|
||||
break;
|
||||
case AFNetworkReachabilityStatusNotReachable:
|
||||
self.isFirstReachability = YES;
|
||||
break;
|
||||
case AFNetworkReachabilityStatusReachableViaWWAN:
|
||||
case AFNetworkReachabilityStatusReachableViaWiFi:
|
||||
{
|
||||
if (self.isFirstReachability) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kNetworkReachabilityKey object:nil userInfo:nil];
|
||||
[self.presenter autoLogin];
|
||||
[[ClientConfig shareConfig] clientInit];
|
||||
}
|
||||
self.isFirstReachability = YES;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
// @kWeakify(self);
|
||||
// [[AFNetworkReachabilityManager sharedManager] startMonitoring];
|
||||
// [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
|
||||
// @kStrongify(self);
|
||||
// switch (status) {
|
||||
// case AFNetworkReachabilityStatusUnknown:
|
||||
// self.isFirstReachability = YES;
|
||||
// break;
|
||||
// case AFNetworkReachabilityStatusNotReachable:
|
||||
// self.isFirstReachability = YES;
|
||||
// break;
|
||||
// case AFNetworkReachabilityStatusReachableViaWWAN:
|
||||
// case AFNetworkReachabilityStatusReachableViaWiFi:
|
||||
// {
|
||||
// if (self.isFirstReachability) {
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:kNetworkReachabilityKey object:nil userInfo:nil];
|
||||
// [self.presenter autoLogin];
|
||||
// [[ClientConfig shareConfig] clientInit];
|
||||
// }
|
||||
// self.isFirstReachability = YES;
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }];
|
||||
}
|
||||
|
||||
#pragma mark - BaseMvpProtocol
|
||||
|
Reference in New Issue
Block a user