修复bug
This commit is contained in:
@@ -496,6 +496,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
- (UITableView *)sessionListView {
|
||||
if (!_sessionListView) {
|
||||
_sessionListView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_sessionListView.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
|
||||
_sessionListView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_sessionListView.backgroundColor = UIColor.clearColor;
|
||||
_sessionListView.delegate = self;
|
||||
|
@@ -34,7 +34,7 @@ typedef NS_ENUM(NSInteger, GuildSearchType) {
|
||||
@property (nonatomic,copy) NSString *clanOwnerUid;
|
||||
///搜索的类型
|
||||
@property (nonatomic,assign) GuildSearchType searchType;
|
||||
|
||||
@property(nonatomic,assign) BOOL isPush;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -189,7 +189,11 @@
|
||||
|
||||
#pragma mark - XPGuildSearchNavView
|
||||
- (void)xPGuildSearchNavView:(XPGuildSearchNavView *)view didClickBack:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
if(self.isPush){
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
return;
|
||||
}
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)xPGuildSearchNavView:(XPGuildSearchNavView *)view didClickSearch:(UIButton *)sender {
|
||||
|
@@ -198,6 +198,7 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess;
|
||||
searchVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
searchVC.searchType = GuildSearchType_Guild_Add_Member;
|
||||
searchVC.delegate = self;
|
||||
searchVC.isPush = YES;
|
||||
[self.navigationController pushViewController:searchVC animated:YES];
|
||||
};
|
||||
|
||||
|
@@ -84,7 +84,7 @@
|
||||
XPNobleCenterPayCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNobleCenterPayCell class]) forIndexPath:indexPath];
|
||||
cell.isChoose = indexPath.row == self.path.row;
|
||||
cell.iconImage = indexPath.row == 0 ? kImage( @"mine_noble_center__diamond") : kImage(@"mine_noble_center_apple");
|
||||
NSString *num = [NSString stringWithFormat:@"(2990%@)",YMLocalizedString(@"XPNobleCenterPayView1")];
|
||||
NSString *num = [NSString stringWithFormat:@"(%@%@)",self.diamonds,YMLocalizedString(@"XPNobleCenterPayView1")];
|
||||
NSString *text = indexPath.row == 0 ? [NSString stringWithFormat:@"%@%@",self.listData[indexPath.row],num] : self.listData[indexPath.row];
|
||||
|
||||
NSMutableAttributedString *titleAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightSemibold],NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)}];
|
||||
@@ -97,6 +97,8 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
self.path = indexPath;
|
||||
self.type = indexPath.row == 0 ? NobleCenterPayType_diamond : NobleCenterPayType_Apple;
|
||||
self.diamondNumView.text = indexPath.row == 0 ? @"2990" : @"$2.99";
|
||||
self.diamondNumTitle.text = indexPath.row == 0 ? YMLocalizedString(@"XPNobleCenterPayView1"):@"";
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)backAction{
|
||||
@@ -104,7 +106,7 @@
|
||||
}
|
||||
-(void)setDiamonds:(NSString *)diamonds{
|
||||
_diamonds = diamonds;
|
||||
self.diamondNumView.text = _diamonds;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)payBtnAction{
|
||||
[self backAction];
|
||||
@@ -133,7 +135,7 @@
|
||||
- (UILabel *)diamondNumView{
|
||||
if(!_diamondNumView){
|
||||
_diamondNumView = [UILabel new];
|
||||
_diamondNumView.text = @"0";
|
||||
_diamondNumView.text = @"2990";
|
||||
_diamondNumView.font = [UIFont systemFontOfSize:28 weight:UIFontWeightSemibold];
|
||||
_diamondNumView.textColor = UIColorFromRGB(0x9168FA);
|
||||
}
|
||||
|
@@ -68,8 +68,8 @@
|
||||
|
||||
- (void)setRechargeModel:(RechargeListModel *)rechargeModel {
|
||||
_rechargeModel = rechargeModel;
|
||||
NSMutableAttributedString *priceStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"¥%.2f",rechargeModel.money.floatValue]];
|
||||
[priceStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:8] range:NSMakeRange(0, 1)];
|
||||
NSMutableAttributedString *priceStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"$%.2f",rechargeModel.money.floatValue]];
|
||||
// [priceStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:8] range:NSMakeRange(0, 1)];
|
||||
self.priceLabel.attributedText = priceStr;
|
||||
NSCharacterSet* nonDigits =[[NSCharacterSet decimalDigitCharacterSet] invertedSet];
|
||||
int remainSecond = [[rechargeModel.prodName stringByTrimmingCharactersInSet:nonDigits] intValue];
|
||||
|
@@ -110,6 +110,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
self.isRefreshRoomInfo = NO;
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_recharge_card_show];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_noble_card_show];
|
||||
|
||||
|
@@ -83,7 +83,7 @@
|
||||
- (UILabel *)tipsLabel {
|
||||
if (!_tipsLabel) {
|
||||
_tipsLabel = [[UILabel alloc] init];
|
||||
_tipsLabel.text = @"咻,收到小可爱的动态了呢~\n审核通过后小秘书会帮你发送并通知你哦~";
|
||||
_tipsLabel.text = YMLocalizedString(@"XPMonentPublishSuccessView1");
|
||||
_tipsLabel.font = [UIFont systemFontOfSize:13];
|
||||
_tipsLabel.numberOfLines = 0;
|
||||
_tipsLabel.textColor = UIColorFromRGB(0x999999);
|
||||
|
@@ -166,7 +166,7 @@
|
||||
}
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
|
||||
[TTPopup alertWithMessage:@"删除后不可恢复\n确定删除该动态吗?" confirmHandler:^{
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
|
||||
[self.presenter deleteMonents:monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
} cancelHandler:^{
|
||||
|
||||
|
@@ -173,7 +173,7 @@
|
||||
}
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
|
||||
[TTPopup alertWithMessage:@"删除后不可恢复\n确定删除该动态吗?" confirmHandler:^{
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
|
||||
[self.presenter deleteMonents:monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
} cancelHandler:^{
|
||||
|
||||
|
@@ -218,7 +218,7 @@
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[@"关注",@"推荐", YMLocalizedString(@"XPMonentsViewController3")];
|
||||
_titles = @[YMLocalizedString(@"XPMonentsViewController1"),YMLocalizedString(@"XPMonentsViewController2"), YMLocalizedString(@"XPMonentsViewController3")];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
if (resultModel) {
|
||||
self.avatarImageView.imageUrl = resultModel.avatar;
|
||||
self.nickLabel.text = type == SearchType_Room ? resultModel.title : resultModel.nick;
|
||||
self.idLabel.text = [NSString stringWithFormat:@"%@号:%@",AppName, resultModel.erbanNo];
|
||||
self.idLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoTableViewCell3"),AppName, resultModel.erbanNo];
|
||||
self.sexImageView.image = resultModel.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
|
||||
if (type == SearchType_Users) {
|
||||
self.numberLabel.text = YMLocalizedString(@"XPSearchListTableViewCell1");
|
||||
@@ -72,7 +72,7 @@
|
||||
if (resultModel) {
|
||||
self.avatarImageView.imageUrl = resultModel.avatar;
|
||||
self.nickLabel.text = resultModel.title ;
|
||||
self.idLabel.text = [NSString stringWithFormat:@"%@号:%@",AppName, resultModel.erbanNo];
|
||||
self.idLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoTableViewCell3"),AppName, resultModel.erbanNo];
|
||||
self.sexImageView.image = resultModel.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
|
||||
if (resultModel.onlineNum > 100) {
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", resultModel.onlineNum];
|
||||
|
@@ -49,7 +49,7 @@
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
label.textColor = [DJDKMIMOMColor textThirdColor];
|
||||
label.text = @"暂无开播厅房~";
|
||||
label.text = YMLocalizedString(@"XPRoomSearchRecommendHeadView0");
|
||||
_emptyTitle = label;
|
||||
}
|
||||
return _emptyTitle;
|
||||
|
@@ -252,7 +252,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
return @[@"房间", YMLocalizedString(@"XPRoomSearchContainerViewController4")];
|
||||
return @[YMLocalizedString(@"XPGuildIncomeSectionView0"), YMLocalizedString(@"XPRoomSearchContainerViewController4")];
|
||||
}
|
||||
|
||||
- (XPHomeSearchNavView *)searchView {
|
||||
|
@@ -318,7 +318,7 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
||||
TTAlertConfig * config = [[TTAlertConfig alloc] init];
|
||||
config.confirmButtonConfig.title = YMLocalizedString(@"XPRoomSearchRecordViewController0");
|
||||
config.cancelButtonConfig.title = YMLocalizedString(@"XPRoomSearchRecordViewController1");
|
||||
config.message = @"确定清空搜索记录吗?";
|
||||
config.message = YMLocalizedString(@"XPRoomSearchRecordViewController2");
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self cleanSearchRecord];
|
||||
[self.searchList removeAllObjects];
|
||||
@@ -332,7 +332,7 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
||||
TTAlertConfig * config = [[TTAlertConfig alloc] init];
|
||||
config.confirmButtonConfig.title = YMLocalizedString(@"XPRoomSearchRecordViewController3");
|
||||
config.cancelButtonConfig.title = YMLocalizedString(@"XPRoomSearchRecordViewController4");
|
||||
config.message = @"确定清空进房记录吗?";
|
||||
config.message = YMLocalizedString(@"XPRoomSearchRecordViewController5");
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self.presenter cleanInRoomRecord];
|
||||
} cancelHandler:^{
|
||||
|
@@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *diamonds;
|
||||
///bannerId
|
||||
@property (nonatomic,copy) NSString * bannerId;
|
||||
///需要的等级
|
||||
@property (nonatomic,assign) NSInteger needLevel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -885,7 +885,7 @@
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB > 0) {
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
if(self.isAnimationListAFinish == YES){
|
||||
|
@@ -48,7 +48,8 @@
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
#import "XPRoomSendTextView.h"
|
||||
#import "XPRoomPKResultView.h"
|
||||
|
||||
#import "XPWebViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
@implementation XPRoomMessageParser
|
||||
|
||||
- (XPMessageInfoModel*)parseMessageAttribute:(NIMMessage *)message {
|
||||
@@ -124,7 +125,7 @@
|
||||
} else if (first == CustomMessageType_RedPacket && attachment.second == Custom_Message_Sub_OpenRedPacketSuccess) {
|
||||
return [self createRedPacketAttribute:attachment messageInfo:messageInfo];
|
||||
} else if (first == CustomMessageType_Graffiti_Star_Kitchen){
|
||||
return [self createStarKitchenAttribute:attachment];
|
||||
return [self createStarredKitchenAttribute:attachment messageInfo:messageInfo];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -298,23 +299,53 @@
|
||||
}
|
||||
|
||||
#pragma mark -星级厨房
|
||||
- (NSAttributedString *)createStarKitchenAttribute:(AttachmentModel *)attachment{
|
||||
XPRoomStarKitchenModel *starModel = [XPRoomStarKitchenModel modelWithDictionary:attachment.data];
|
||||
NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomMessageParser103"),starModel.nick,starModel.itemMultiple,starModel.diamonds];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageDefalutFont],NSForegroundColorAttributeName:[DJDKMIMOMColor messageDefaultTextColor]}];
|
||||
[attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageNickColor]} range:[title rangeOfString:starModel.nick]];
|
||||
[attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageTextColor]} range:[title rangeOfString:[NSString stringWithFormat:@" %@",starModel.itemMultiple]]];
|
||||
[attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageTextColor]} range:[title rangeOfString:[NSString stringWithFormat:@" %@",starModel.diamonds]]];
|
||||
@kWeakify(self)
|
||||
[attribute yy_setTextHighlightRange:[title rangeOfString:starModel.nick] color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
if (starModel.uid.integerValue <= 0) {return;}
|
||||
[self showUserCard:starModel.uid.integerValue];
|
||||
}];
|
||||
//- (NSAttributedString *)createStarKitchenAttribute:(AttachmentModel *)attachment{
|
||||
// XPRoomStarKitchenModel *starModel = [XPRoomStarKitchenModel modelWithDictionary:attachment.data];
|
||||
// NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomMessageParser103"),starModel.nick,starModel.itemMultiple,starModel.diamonds];
|
||||
// NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageDefalutFont],NSForegroundColorAttributeName:[DJDKMIMOMColor messageDefaultTextColor]}];
|
||||
// [attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageNickColor]} range:[title rangeOfString:starModel.nick]];
|
||||
// [attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageTextColor]} range:[title rangeOfString:[NSString stringWithFormat:@" %@",starModel.itemMultiple]]];
|
||||
// [attribute addAttributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor messageTextColor]} range:[title rangeOfString:[NSString stringWithFormat:@" %@",starModel.diamonds]]];
|
||||
// @kWeakify(self)
|
||||
// [attribute yy_setTextHighlightRange:[title rangeOfString:starModel.nick] color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
// @kStrongify(self);
|
||||
// if (starModel.uid.integerValue <= 0) {return;}
|
||||
// [self showUserCard:starModel.uid.integerValue];
|
||||
// }];
|
||||
//
|
||||
// return attribute;
|
||||
//}
|
||||
|
||||
return attribute;
|
||||
- (XPMessageInfoModel *)createStarredKitchenAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
|
||||
XPRoomStarKitchenModel * giftInfo = [XPRoomStarKitchenModel modelWithDictionary:attachment.data];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
CGFloat fontSize = 13;
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"恭喜" color:[UIColor whiteColor] font:fontSize]];
|
||||
NSString * nick = giftInfo.nick;
|
||||
if (nick.length > 6) {
|
||||
nick = [nick substringToIndex:6];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor colorWithHexString:@"#FEF23E"] font:fontSize]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"在星级厨房中获得" color:[UIColor whiteColor] font:fontSize]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%@", giftInfo.diamonds] color:[DJDKMIMOMColor colorWithHexString:@"#00EAFF"] font:fontSize]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"钻石价值的碎片奖励" color:[UIColor whiteColor] font:fontSize]];
|
||||
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
|
||||
paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
|
||||
paragraphStyle.lineSpacing = 4.0f;//行间距
|
||||
paragraphStyle.baseWritingDirection = NSWritingDirectionLeftToRight;
|
||||
[attribute addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attribute.length)];
|
||||
@kWeakify(self);
|
||||
[attribute yy_setTextHighlightRange:NSMakeRange(0, attribute.length) color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
if (giftInfo &&giftInfo.needLevel < self.hostDelegate.getUserInfo.userLevelVo.experLevelSeq && giftInfo.skipUrl.length > 0) {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = giftInfo.skipUrl;
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
}];
|
||||
messageInfo.content = attribute;
|
||||
return messageInfo;
|
||||
}
|
||||
|
||||
#pragma mark - 红包
|
||||
- (XPMessageInfoModel *)createRedPacketAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
|
||||
XPOpenRedPacketModel *info = [XPOpenRedPacketModel modelWithDictionary:attachment.data];
|
||||
|
@@ -191,7 +191,7 @@
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//设置按钮显示读秒效果
|
||||
self.countLabel.text = [NSString stringWithFormat:@"剩余%zds", tempTime];
|
||||
self.countLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPRoomSearchRecordViewController9"), tempTime];
|
||||
});
|
||||
tempTime--;
|
||||
}
|
||||
|
@@ -379,7 +379,7 @@
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB > 0) {
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
if(self.isAnimationListAFinish == YES){
|
||||
|
@@ -644,7 +644,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
self.viewControllers = nil;
|
||||
NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"];
|
||||
NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"];
|
||||
NSArray *tabLabel = @[@"首页",@"动态",@"消息", YMLocalizedString(@"TabbarViewController5")];
|
||||
NSArray *tabLabel = @[YMLocalizedString(@"TabbarViewController2"),YMLocalizedString(@"TabbarViewController3"),YMLocalizedString(@"TabbarViewController4"), YMLocalizedString(@"TabbarViewController5")];
|
||||
|
||||
UIViewController *game;
|
||||
UIViewController *msg;
|
||||
|
Reference in New Issue
Block a user