From 4fc4e177b7b5bd6ca1aeb8621d452ea0bd0d2da0 Mon Sep 17 00:00:00 2001
From: Ghazi Triki <ghazi.triki@riadvice.tn>
Date: Tue, 17 Apr 2018 16:07:12 +0100
Subject: [PATCH] Code improvement.

---
 clients/flash/air-client/src/css/hdpi.css                   | 5 +----
 clients/flash/air-client/src/css/ldpi.css                   | 5 +----
 clients/flash/air-client/src/css/mdpi.css                   | 5 +----
 clients/flash/air-client/src/css/xhdpi.css                  | 5 +----
 clients/flash/air-client/src/css/xxhdpi.css                 | 5 +----
 clients/flash/air-client/src/css/xxxhdpi.css                | 5 +----
 .../air-client/src/org/bigbluebutton/air/main/MainConfig.as | 6 +++---
 .../air/main/commands/UserInactivityTimerCommand.as         | 4 ++--
 .../views/{UserInactivityView.as => UserInactivityPopUp.as} | 4 ++--
 ...tivityViewMediator.as => UserInactivityPopUpMediator.as} | 4 ++--
 .../org/bigbluebutton/air/poll/views/PollPopUpMediator.as   | 1 +
 11 files changed, 16 insertions(+), 33 deletions(-)
 rename clients/flash/air-client/src/org/bigbluebutton/air/main/views/{UserInactivityView.as => UserInactivityPopUp.as} (87%)
 rename clients/flash/air-client/src/org/bigbluebutton/air/main/views/{UserInactivityViewMediator.as => UserInactivityPopUpMediator.as} (85%)

diff --git a/clients/flash/air-client/src/css/hdpi.css b/clients/flash/air-client/src/css/hdpi.css
index 54939d9107..5cad108047 100755
--- a/clients/flash/air-client/src/css/hdpi.css
+++ b/clients/flash/air-client/src/css/hdpi.css
@@ -73,7 +73,7 @@
         padding: 22.50;
     }
 
-    main|ExitView, main|DisconnectView, main|UserInactivityView {
+    main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
         gap: 22.50;
         padding: 22.50;
     }
@@ -121,9 +121,6 @@
     main|MobilePopUp {
         cornerRadius: 6.00;
         fontSize: 16.50;
-    }
-
-    main|MobilePopUp {
         padding: 9.00;
     }
 
diff --git a/clients/flash/air-client/src/css/ldpi.css b/clients/flash/air-client/src/css/ldpi.css
index 6e0131a55a..0a32ef8a0e 100755
--- a/clients/flash/air-client/src/css/ldpi.css
+++ b/clients/flash/air-client/src/css/ldpi.css
@@ -73,7 +73,7 @@
         padding: 11.250;
     }
 
-    main|ExitView, main|DisconnectView, main|UserInactivityView {
+    main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
         gap: 11.250;
         padding: 11.250;
     }
@@ -121,9 +121,6 @@
     main|MobilePopUp {
         cornerRadius: 3.000;
         fontSize: 8.250;
-    }
-
-    main|MobilePopUp {
         padding: 4.500;
     }
 
diff --git a/clients/flash/air-client/src/css/mdpi.css b/clients/flash/air-client/src/css/mdpi.css
index 0b7552f36f..872be0f3b6 100755
--- a/clients/flash/air-client/src/css/mdpi.css
+++ b/clients/flash/air-client/src/css/mdpi.css
@@ -73,7 +73,7 @@
         padding: 15.0;
     }
 
-    main|ExitView, main|DisconnectView, main|UserInactivityView {
+    main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
         gap: 15.0;
         padding: 15.0;
     }
@@ -121,9 +121,6 @@
     main|MobilePopUp {
         cornerRadius: 4.0;
         fontSize: 11.0;
-    }
-
-    main|MobilePopUp {
         padding: 6.0;
     }
 
diff --git a/clients/flash/air-client/src/css/xhdpi.css b/clients/flash/air-client/src/css/xhdpi.css
index 5deb4b2aa4..4249d8cad6 100755
--- a/clients/flash/air-client/src/css/xhdpi.css
+++ b/clients/flash/air-client/src/css/xhdpi.css
@@ -61,7 +61,7 @@
 		padding: 30;
 	}
 	
-	main|ExitView, main|DisconnectView, main|UserInactivityView {
+	main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
 		gap     : 30;
 		padding : 30;
 	}
@@ -109,9 +109,6 @@
 	main|MobilePopUp {
 		cornerRadius : 8;
 		fontSize     : 22;
-	}
-	
-	main|MobilePopUp {
 		padding : 12;
 	}
 	
diff --git a/clients/flash/air-client/src/css/xxhdpi.css b/clients/flash/air-client/src/css/xxhdpi.css
index ffe4d2c5c9..9459937725 100755
--- a/clients/flash/air-client/src/css/xxhdpi.css
+++ b/clients/flash/air-client/src/css/xxhdpi.css
@@ -73,7 +73,7 @@
         padding: 45.0;
     }
 
-    main|ExitView, main|DisconnectView, main|UserInactivityView {
+    main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
         gap: 45.0;
         padding: 45.0;
     }
@@ -121,9 +121,6 @@
     main|MobilePopUp {
         cornerRadius: 12.0;
         fontSize: 33.0;
-    }
-
-    main|MobilePopUp {
         padding: 18.0;
     }
 
diff --git a/clients/flash/air-client/src/css/xxxhdpi.css b/clients/flash/air-client/src/css/xxxhdpi.css
index 67cef4afc6..2f09d74ba2 100755
--- a/clients/flash/air-client/src/css/xxxhdpi.css
+++ b/clients/flash/air-client/src/css/xxxhdpi.css
@@ -73,7 +73,7 @@
         padding: 60;
     }
 
-    main|ExitView, main|DisconnectView, main|UserInactivityView {
+    main|ExitView, main|DisconnectView, main|UserInactivityPopUp {
         gap: 60;
         padding: 60;
     }
@@ -121,9 +121,6 @@
     main|MobilePopUp {
         cornerRadius: 16;
         fontSize: 44;
-    }
-
-    main|MobilePopUp {
         padding: 24;
     }
 
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as
index 64261f1910..3fd5b00ab7 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as
@@ -24,8 +24,8 @@ package org.bigbluebutton.air.main {
 	import org.bigbluebutton.air.main.views.PagesNavigatorViewMediator;
 	import org.bigbluebutton.air.main.views.TopToolbarBase;
 	import org.bigbluebutton.air.main.views.TopToolbarMediator;
-	import org.bigbluebutton.air.main.views.UserInactivityView;
-	import org.bigbluebutton.air.main.views.UserInactivityViewMediator;
+	import org.bigbluebutton.air.main.views.UserInactivityPopUp;
+	import org.bigbluebutton.air.main.views.UserInactivityPopUpMediator;
 	
 	import robotlegs.bender.extensions.matching.TypeMatcher;
 	import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
@@ -64,7 +64,7 @@ package org.bigbluebutton.air.main {
 			mediatorMap.map(ExitView).toMediator(ExitViewMediator);
 			mediatorMap.map(DisconnectView).toMediator(DisconnectViewMediator);
 			mediatorMap.map(MainView).toMediator(MainViewMediator);
-			mediatorMap.map(UserInactivityView).toMediator(UserInactivityViewMediator);
+			mediatorMap.map(UserInactivityPopUp).toMediator(UserInactivityPopUpMediator);
 		}
 		
 		/**
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/UserInactivityTimerCommand.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/UserInactivityTimerCommand.as
index eaec2d6969..09ce1a36a7 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/UserInactivityTimerCommand.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/UserInactivityTimerCommand.as
@@ -3,7 +3,7 @@ package org.bigbluebutton.air.main.commands {
 	
 	import spark.components.Application;
 	
-	import org.bigbluebutton.air.main.views.UserInactivityView;
+	import org.bigbluebutton.air.main.views.UserInactivityPopUp;
 	
 	import robotlegs.bender.bundles.mvcs.Command;
 	
@@ -14,7 +14,7 @@ package org.bigbluebutton.air.main.commands {
 		
 		override public function execute():void {
 			trace("RECEIVED INACTIVITY TIMER MESSAGE responseDuration=" + responseDuration);
-			var userInactivityView:UserInactivityView = new UserInactivityView();
+			var userInactivityView:UserInactivityPopUp = new UserInactivityPopUp();
 			userInactivityView.text = "Your client is going to close in " + responseDuration.toString() + " seconds";
 			userInactivityView.open(Application(FlexGlobals.topLevelApplication), true);
 		}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityView.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUp.as
similarity index 87%
rename from clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityView.as
rename to clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUp.as
index 72508d2ba4..5a35bbf5db 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityView.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUp.as
@@ -4,14 +4,14 @@ package org.bigbluebutton.air.main.views {
 	import spark.layouts.HorizontalLayout;
 	import spark.layouts.VerticalLayout;
 	
-	public class UserInactivityView extends MobilePopUp {
+	public class UserInactivityPopUp extends MobilePopUp {
 		private var _okButton:Button;
 		
 		public function get okButton():Button {
 			return _okButton;
 		}
 		
-		public function UserInactivityView() {
+		public function UserInactivityPopUp() {
 			super();
 			
 			_okButton = new Button();
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUpMediator.as
similarity index 85%
rename from clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityViewMediator.as
rename to clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUpMediator.as
index 031e22ba68..d21fa3b645 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityViewMediator.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/UserInactivityPopUpMediator.as
@@ -7,10 +7,10 @@ package org.bigbluebutton.air.main.views
 	
 	import robotlegs.bender.bundles.mvcs.Mediator;
 
-	public class UserInactivityViewMediator extends Mediator
+	public class UserInactivityPopUpMediator extends Mediator
 	{
 		[Inject]
-		public var view:UserInactivityView;
+		public var view:UserInactivityPopUp;
 		
 		[Inject]
 		public var userInactivityTimerResponseSignal:UserInactivityTimerResponseSignal;
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/poll/views/PollPopUpMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/poll/views/PollPopUpMediator.as
index 5e9b4ff9df..18da40be77 100644
--- a/clients/flash/air-client/src/org/bigbluebutton/air/poll/views/PollPopUpMediator.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/poll/views/PollPopUpMediator.as
@@ -59,6 +59,7 @@ package org.bigbluebutton.air.poll.views {
 		public override function destroy():void {
 			meetingData.polls.pollChangeSignal.remove(onPollChange);
 			view.removeEventListener(MouseEvent.CLICK, viewMouseEventHandler);
+			view.stage.removeEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onStageOrientation);
 		}
 	
 	}
-- 
GitLab