37 lines
1.1 KiB
Objective-C
37 lines
1.1 KiB
Objective-C
//
|
|
// QXRoomViewController+Activity.m
|
|
// QXLive
|
|
//
|
|
// Created by 启星 on 2025/10/15.
|
|
//
|
|
|
|
#import "QXRoomViewController+Activity.h"
|
|
#import "QXMeetActivityDriftView.h"
|
|
@implementation QXRoomViewController (Activity)
|
|
|
|
-(void)initActivityObeserver{
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateProgress:) name:noticeXLHNotice object:nil];
|
|
}
|
|
|
|
-(void)updateProgress:(NSNotification *)notice{
|
|
QXMeetActivityDriftModel *model = notice.object;
|
|
if (model.from_type == QXMeetActivityTypeAcLock) {
|
|
[self.meetView updateUserAndGiftInfoWithModel:model];
|
|
self.acTagView.end_time = model.end_time.longLongValue;
|
|
return;
|
|
}
|
|
if (model.from_type == QXMeetActivityTypeAcProgress) {
|
|
[self.skyView updateProgress:model.xlh_data];
|
|
[self.ageView updateProgress:model.xlh_data];
|
|
[self.timeView updateProgress:model.xlh_data];
|
|
}
|
|
if (model.xlh_data.status.intValue == 1) {
|
|
self.acTagView.end_time = model.xlh_data.end_time;
|
|
[self.view addSubview:self.acTagView];
|
|
}else{
|
|
[self.acTagView stopTimer];
|
|
[self.acTagView removeFromSuperview];
|
|
}
|
|
}
|
|
@end
|