修改了房间公告可以后台配置隐藏

This commit is contained in:
fengshuo
2022-03-16 21:33:02 +08:00
parent 3c33e7d21e
commit 6d8ad2bafe
6 changed files with 28 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
///MD5加密
- (NSString *)MD5String;
+ (BOOL)versionCompareOldStr:(NSString *)first andNewStr: (NSString *)second;
@end
NS_ASSUME_NONNULL_END

View File

@@ -31,4 +31,14 @@
];
}
+ (BOOL)versionCompareOldStr:(NSString *)first andNewStr: (NSString *)second{
if ([first compare:second options:NSNumericSearch] == NSOrderedDescending){
return NO;
}else if ([first compare:second options:NSNumericSearch] == NSOrderedSame){
return YES;
}else{
return YES;
}
}
@end

View File

@@ -20,6 +20,7 @@
#import "XCHudTool.h"
#import "XPHtmlUrl.h"
#import "Api+Mine.h"
#import "ClientConfig.h"
///Model
#import "RoomInfoModel.h"
#import "MicroQueueModel.h"
@@ -284,6 +285,7 @@
}
- (void)updateRoomTopic {
self.topicStackView.hidden= [ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES;
[self updateRoomTopicViewConstraint];
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];

View File

@@ -18,6 +18,7 @@
#import "AccountInfoStorage.h"
#import "XPRoomMiniManager.h"
#import "PLTimeUtil.h"
#import "ClientConfig.h"
///Model
#import "RoomInfoModel.h"
#import "AttachmentModel.h"
@@ -265,6 +266,9 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
///
- (void)createUserEnterRoomAddRoomtopicMessage {
if ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES) {
return;
}
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
if (roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {return;}
NSString * key = [NSString stringWithFormat:@"%@_%@_%ld", kRoomShowTopicKey, [AccountInfoStorage instance].getUid, roomInfo.uid];

View File

@@ -12,6 +12,8 @@
#import "XPConstant.h"
#import <MJExtension/MJExtension.h>
#import "XPRoomFaceTool.h"
#import "NSString+Utils.h"
#import "YYUtility.h"
@interface ClientConfig ()
/// 10
@@ -53,6 +55,12 @@
///
[[XPRoomFaceTool shareFaceTool] downFaceData];
}
//
NSString *serverVer = initData[@"appStoreAuditNoticeVersion"];
NSString *shortVer = [YYUtility appVersion];
BOOL isHigh = [NSString versionCompareOldStr:serverVer andNewStr:shortVer];
model.appStoreAuditNoticeVersion = isHigh;
self.configInfo = model;
} else {
if (self.retryCount < 10) {

View File

@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong) NSArray<NSString *> *homeTabList;
///房间表情的数据
@property (nonatomic,copy) NSDictionary *faceInitData;
///是否隐藏房间公告
@property (nonatomic,assign) BOOL appStoreAuditNoticeVersion;
@end
NS_ASSUME_NONNULL_END