Commit f8a98d6e authored by 朱璇's avatar 朱璇

bugfix @陈雪 [ios-结束视频弹窗]医生点击结束视频弹窗在结束视频后仍然显示

parent b5425b7c
......@@ -24,7 +24,6 @@
GMTTTUser *_user;//加入进来的医生模型
GMLinkPromptView *_linePrompView;
GMUserFillMessageView *_userMessagLabel; //用户信息
UIAlertController *_alert; // 时间太短提示弹窗
}
- (instancetype)initWithFrame:(CGRect)frame
......@@ -215,8 +214,8 @@
[_functionView endTime];
[_TTManager closeExcitRoom];
if (_alert) {
[_alert dismissViewControllerAnimated:YES completion:nil];
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
}
......@@ -241,15 +240,15 @@
- (void)closeRoom:(BOOL) status {
if (_TTManager.totalTime < 180) {
_alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"本次视频面诊时间貌似有点短,确定不再聊会儿?" preferredStyle:UIAlertControllerStyleAlert];
[_alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"本次视频面诊时间貌似有点短,确定不再聊会儿?" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
}]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
}];
[_alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:_alert animated:YES completion:NULL];
[alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL];
} else {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
......
......@@ -26,7 +26,6 @@
GMTTTUser *doctorUser;//加入进来的医生模型
GMLinkPromptView *_linePrompView;
GMTelephoneAudioPlay *_audioPlay;
UIAlertController *_alert; // 时间太短提示弹窗
}
@property (nonatomic, strong) GMRtcManager *TTManager;
@property (nonatomic, strong)GMUserTelephoneFunctionView *functionView;
......@@ -320,15 +319,15 @@
if (_TTManager.totalTime < 180) {
NSString *title = _TTManager.vidoeTelephoneModel.counsellorInfo.counsellorType == 2 ? @"面诊师":@"医生";
NSString *name = [NSString stringWithFormat:@"%@擅长很多项目,可以多咨询呦",title];
_alert = [UIAlertController alertControllerWithTitle:@"提示" message:name preferredStyle:UIAlertControllerStyleAlert];
[_alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:name preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
}]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
}];
[_alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:_alert animated:YES completion:NULL];
[alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL];
} else {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
......@@ -356,8 +355,8 @@
[_TTManager closeExcitRoom];
[_functionView endTime];
if (_alert) {
[_alert dismissViewControllerAnimated:YES completion:nil];
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
}
[UIView animateWithDuration:0.4 animations:^{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment