Sfoglia il codice sorgente

[*] 退出登录 & 注销也要执行关闭最小化小窗口流程

Steven 1 anno fa
parent
commit
09234617a3

+ 2 - 0
MiMoLive/MiMoLive/Classes/Live/Manage/MOMinimizeManager.h

@@ -44,6 +44,8 @@ typedef void(^MOMinimizeManagerEnterRoomBlock)(void);
 
 - (void)closeAgoraRoom;
 
+- (void)closeAll;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 4 - 2
MiMoLive/MiMoLive/Classes/Live/Manage/MOMinimizeManager.m

@@ -124,11 +124,15 @@ static MOMinimizeManager *_manager;
 }
 
 - (void)closeAll {
+    if (!_minimizeView) {
+        return;
+    }
     [self closeMinimizeView];
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
         [self closeAgoraRoom];
     });
     [NSObject cancelPreviousPerformRequestsWithTarget:self];
+    self.closeTheMiniViewBlock ? self.closeTheMiniViewBlock() : nil;
 }
 
 - (void)setRtcBlock{
@@ -313,8 +317,6 @@ static MOMinimizeManager *_manager;
         return;
     }
     
-    self.closeTheMiniViewBlock ? self.closeTheMiniViewBlock() : nil;
-    
     [[MOShowAgoraKitManager shareManager].exitFailedArr removeAllObjects];
     
     NSInteger agoraId = GetAgoraId;

+ 3 - 0
MiMoLive/MiMoLive/Classes/Mine/Controller/AboutAccountSecurity/MOAccountSecurityVC.m

@@ -18,6 +18,7 @@
 #import "MOBindingEmailVC.h"
 #import "MOSetPasswordSMS.h"
 #import "MOSetPassword2GuideVC.h"
+#import "MOMinimizeManager.h"
 
 @interface MOAccountSecurityVC ()
 
@@ -273,6 +274,8 @@
 }
 
 - (IBAction)deleteAccountAction:(id)sender {
+    //关闭最小化小窗口
+    [[MOMinimizeManager shareManager] closeAll];
     WEAKSELF
     MODeleteAccountAlertView *view = [MODeleteAccountAlertView moDeleteAccountAlertView];
     view.secondSureBlock = ^{

+ 3 - 0
MiMoLive/MiMoLive/Classes/Mine/Controller/MOMineSetUpVC.m

@@ -19,6 +19,7 @@
 #import "MOPhoneBindVC.h"
 #import "MONewVersionView.h"
 #import "MOAccountSecurityVC.h"
+#import "MOMinimizeManager.h"
 
 @interface MOMineSetUpVC ()
 
@@ -283,6 +284,8 @@
 
 - (IBAction)quitBtnClick:(id)sender {
     //TODO: 退出登录
+    //关闭最小化小窗口
+    [[MOMinimizeManager shareManager] closeAll];
     
     WEAKSELF
     UIAlertController *sheetC = [UIAlertController alertControllerWithTitle:nil message:NSLocalString(@"mimo_setting_revoked_alert_title") preferredStyle:UIAlertControllerStyleActionSheet];