45 lines
1.2 KiB
Objective-C
45 lines
1.2 KiB
Objective-C
//
|
|
// XPRoomPositionDataSourceImpl.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2021/10/15.
|
|
//
|
|
|
|
#import "XPRoomPositionDelegateImpl.h"
|
|
#import "TTPopup.h"
|
|
#import "XPIMManager.h"
|
|
#import "AccountInfoStorage.h"
|
|
///Model
|
|
#import "UserInfoModel.h"
|
|
#import "MicroQueueItemModel.h"
|
|
#import "AccountInfoStorage.h"
|
|
|
|
|
|
@implementation XPRoomPositionDelegateImpl
|
|
|
|
- (void)showManagerMicroSheet:(NSString *)postion {
|
|
TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:@"上麦" clickAction:^{
|
|
[[XPIMManager shareManager].microQueueManager upMic:postion];
|
|
}];
|
|
|
|
TTActionSheetConfig *downMic = [TTActionSheetConfig normalTitle:@"下麦" clickAction:^{
|
|
[[XPIMManager shareManager].microQueueManager downMic:postion];
|
|
}];
|
|
|
|
MicroQueueItemModel * micModel = [[XPIMManager shareManager].microQueueManager.microQueue objectForKey:postion];
|
|
if (micModel.userInfo && [AccountInfoStorage instance].getUid.integerValue == micModel.userInfo.uid) {
|
|
[TTPopup actionSheetWithItems:@[downMic]];
|
|
} else {
|
|
[TTPopup actionSheetWithItems:@[upMic]];
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark - XPRoomPositionDelgate
|
|
- (void)didClickPositionItem:(NSString *)postion {
|
|
[self showManagerMicroSheet:postion];
|
|
}
|
|
|
|
|
|
@end
|