Sfoglia il codice sorgente

Users in the common editor will be stuck if they are kicked out, and they will not be able to return to the login interface -- common editor 下用户被踢出会卡死,无法回到登陆界面(resolve: #14617)
The common editor action cell cannot be changed back to black after graying out -- common editor action 单元格变灰后无法变回黑色 (resolve: #14616)

Ray Zhang 4 anni fa
parent
commit
1ba58804ed

BIN
RA TradeFiling/RA TradeFiling.xcodeproj/project.xcworkspace/xcuserdata/ruizhang.xcuserdatad/UserInterfaceState.xcuserstate


+ 71 - 311
RA TradeFiling/RA TradeFiling.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -7,143 +7,79 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "661AD48C-D893-4F5F-AE71-376A82B0A7AB"
+            uuid = "6EC792AC-05E8-4754-BBBE-F9C498B8E7C7"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/RASingleton.m"
+            filePath = "../common/RAUtils.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "122"
-            endingLineNumber = "122"
-            landmarkName = "-login:password:firstName:companyList:functions:active:"
+            startingLineNumber = "643"
+            endingLineNumber = "643"
+            landmarkName = "+message_alert:title:controller:action_handler:completion:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "AC18C53B-792B-45EA-B764-1BBF55DBBC5C"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/DataProvider/RADataProvider.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "381"
-            endingLineNumber = "381"
-            landmarkName = "+updateFunctionPanel"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "8CA0655F-1BDD-4C1E-9CD7-9D7F3591E3F6"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/Home/RAHomeViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1034"
-            endingLineNumber = "1034"
-            landmarkName = "-showMoreOrderForSection:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "BD1D2AEE-31ED-47F1-B7A6-39E569BDB81B"
+            uuid = "4A1DB9E7-4DAE-4235-8D3C-30A2FB24A2B5"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1374"
-            endingLineNumber = "1374"
-            landmarkName = "-refresh:discardDirty:"
+            startingLineNumber = "4104"
+            endingLineNumber = "4104"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "358AAAFD-FB46-48B3-81C3-A7D751816C35"
+            uuid = "6DCF7080-5EF4-4AC4-B345-B1E08A0CD371"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1393"
-            endingLineNumber = "1393"
-            landmarkName = "-refresh:discardDirty:"
+            startingLineNumber = "5109"
+            endingLineNumber = "5109"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "358AAAFD-FB46-48B3-81C3-A7D751816C35 - adbdc81f1281180e"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__51-[CommonEditorViewController refresh:discardDirty:]_block_invoke"
-                  moduleName = "RA TradeFiling"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/ruizhang/Documents/CODE_IOS/ERPSuiteIOS/common/customUI/commoneditor/CommonEditorViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1393"
-                  endingLineNumber = "1393"
-                  offsetFromSymbolStart = "19">
-               </Location>
-               <Location
-                  uuid = "358AAAFD-FB46-48B3-81C3-A7D751816C35 - 1b447630f16fd938"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__51-[CommonEditorViewController refresh:discardDirty:]_block_invoke_2"
-                  moduleName = "RA TradeFiling"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/ruizhang/Documents/CODE_IOS/ERPSuiteIOS/common/customUI/commoneditor/CommonEditorViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1394"
-                  endingLineNumber = "1394"
-                  offsetFromSymbolStart = "47">
-               </Location>
-            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "4EA2D464-9E48-4A3D-A63D-AEE58EF06681"
-            shouldBeEnabled = "No"
+            uuid = "0188260C-7F62-4C13-B105-E47D5A66ADAF"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1400"
-            endingLineNumber = "1400"
-            landmarkName = "-refresh:discardDirty:"
+            startingLineNumber = "457"
+            endingLineNumber = "457"
+            landmarkName = "-viewDidLoad"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "FC22237E-D2AA-48F8-B2D8-AE9C29E58F61"
+            uuid = "08697C7C-18AE-4F39-9CAA-13FA05E33035"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1405"
-            endingLineNumber = "1405"
+            startingLineNumber = "1428"
+            endingLineNumber = "1428"
             landmarkName = "-refresh:discardDirty:"
             landmarkType = "7">
          </BreakpointContent>
@@ -151,273 +87,97 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "571B86C3-E815-40D7-AE94-14824728C492"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1332"
-            endingLineNumber = "1332"
-            landmarkName = "-CopyDirty:to:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "DE55F235-350B-4128-A5D5-C802E1BBA44E"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectOnlineViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "649"
-            endingLineNumber = "649"
-            landmarkName = "-loadData:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "65C7D7FB-2640-4CF1-8E59-DA7907268D1A"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "4771"
-            endingLineNumber = "4771"
-            landmarkName = "-tableView:willSelectRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "0754DDA0-95EB-4C0F-99BF-D8361A678119"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "581"
-            endingLineNumber = "581"
-            landmarkName = "-tableView:didSelectRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "72C4EA86-7BC0-4EEC-9D83-5DA6E47D5D11"
+            uuid = "A00F5D5C-8D72-4C50-9DF1-93C01BEA323F"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "4770"
-            endingLineNumber = "4770"
-            landmarkName = "-tableView:willSelectRowAtIndexPath:"
+            startingLineNumber = "2637"
+            endingLineNumber = "2637"
+            landmarkName = "-textfieldSetValue:value:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "C1CA9B1B-AE1F-43E0-8923-9A7292FEB7EB"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "427"
-            endingLineNumber = "427"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "F1696174-03C8-4749-A75F-E747AD3C57DB"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/DataProvider/RADataProvider.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "128"
-            endingLineNumber = "128"
-            landmarkName = "+LoadHome:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "CBEFF903-CEF3-4A75-B85C-CDAE4A044C66"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "420"
-            endingLineNumber = "420"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "56947719-D0A7-4CB4-9842-E20A65177D32"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/TFEditor/TFEditorViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "62"
-            endingLineNumber = "62"
-            landmarkName = "-menuItemClick:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "5CD8CBD1-B7D4-493C-816A-4AE2C5046DF2"
+            uuid = "B0A22346-6C0A-4EFA-A4B3-8CCECE79AC2C"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1965"
-            endingLineNumber = "1965"
-            landmarkName = "-handle_action_return:indexPath:action:"
+            startingLineNumber = "2794"
+            endingLineNumber = "2794"
+            landmarkName = "-textfieldSetValue:value:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "4C881F62-86E0-47E8-A0E2-2C5F5D5CDA38"
+            uuid = "69F0C882-40F0-4FC0-BE1D-7BF3563DF46A"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
+            filePath = "RA TradeFiling/DataProvider/OnlineDataProvider.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "5401"
-            endingLineNumber = "5401"
-            landmarkName = "-setEnumValue:indexPath:"
+            startingLineNumber = "310"
+            endingLineNumber = "310"
+            landmarkName = "+request_interface:parameters:err_record_url:completionHandler:retry:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "BF62F7D2-4649-4CEC-A3E5-47C101574061"
+            uuid = "E8BADCBC-CF79-4494-9DD8-27254E3A28B8"
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectViewController.m"
+            filePath = "RA TradeFiling/TFNavigationController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "130"
-            endingLineNumber = "130"
-            landmarkName = "-viewWillDisappear:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "EBE3D196-1444-459C-91E7-58E2898437C1"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "451"
-            endingLineNumber = "451"
-            landmarkName = "-tableView:didSelectRowAtIndexPath:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "1B30E7FC-2CA9-4554-9E1D-1C351C44A1C3"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/DataProvider/RADataProvider.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "181"
-            endingLineNumber = "181"
-            landmarkName = "+request_editor:params:completionHandler:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "220666ED-0124-4101-A30A-E6AC5EE8B018"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1226"
-            endingLineNumber = "1226"
-            landmarkName = "-get_refresh_param"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "AF9891F3-F40B-49F3-B466-034FBD6D05BB"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA TradeFiling/TFEditor/TFEditorViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "332"
-            endingLineNumber = "332"
-            landmarkName = "-commonAction:index:data:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "75B081DC-4869-48A4-83D3-752F9B7380DA"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/customUI/commoneditor/EnumSelectOnlineViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "377"
-            endingLineNumber = "377"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            startingLineNumber = "145"
+            endingLineNumber = "145"
+            landmarkName = "-receiveHandleKickoutNotification:"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "E8BADCBC-CF79-4494-9DD8-27254E3A28B8 - cb403cc1acc8b3eb"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[TFNavigationController receiveHandleKickoutNotification:]"
+                  moduleName = "RA TradeFiling"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ruizhang/Documents/CODE_IOS/ERPSuiteIOS/RA%20TradeFiling/RA%20TradeFiling/TFNavigationController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "145"
+                  endingLineNumber = "145"
+                  offsetFromSymbolStart = "263">
+               </Location>
+               <Location
+                  uuid = "E8BADCBC-CF79-4494-9DD8-27254E3A28B8 - 1dd472414e4612db"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__59-[TFNavigationController receiveHandleKickoutNotification:]_block_invoke"
+                  moduleName = "RA TradeFiling"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ruizhang/Documents/CODE_IOS/ERPSuiteIOS/RA%20TradeFiling/RA%20TradeFiling/TFNavigationController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "147"
+                  endingLineNumber = "147"
+                  offsetFromSymbolStart = "48">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
    </Breakpoints>

+ 11 - 9
RA TradeFiling/RA TradeFiling/DataProvider/OnlineDataProvider.m

@@ -307,15 +307,17 @@
         if([resultjson[@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
         {
 //            [RAUtils message_alert:@"User login on other device." title:@"Warrning" controller:nil];
-            UIViewController* vc = [RAUtils getCurrentVC];
-            [RAUtils message_alert:@"User login on other device." title:@"Warrning" controller:vc action_handler:^(UIAlertAction * _Nonnull action) {
-                [vc.navigationController popToRootViewControllerAnimated:true];
-                [RASingleton.sharedInstance logout];
-                [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_LOGOUT object:nil];
-            } completion:^{
-                
-
-                        }];
+            [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:resultjson[@"err_msg"]];
+            
+//            UIViewController* vc = [RAUtils getCurrentVC];
+//            [RAUtils message_alert:@"User login on other device." title:@"Warrning" controller:vc action_handler:^(UIAlertAction * _Nonnull action) {
+//                [vc.navigationController popToRootViewControllerAnimated:true];
+//                [RASingleton.sharedInstance logout];
+//                [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_LOGOUT object:nil];
+//            } completion:^{
+//
+//
+//                        }];
         }
         
         //            NSMutableDictionary *resultDic = resultjson;

+ 1 - 0
RA TradeFiling/RA TradeFiling/TFNavigationController.h

@@ -10,4 +10,5 @@
 
 @interface TFNavigationController : UINavigationController
 -(void) setupColor;
+@property bool showkickout;
 @end

+ 23 - 5
RA TradeFiling/RA TradeFiling/TFNavigationController.m

@@ -9,6 +9,7 @@
 #import "TFNavigationController.h"
 #import "RASingleton.h"
 #import "const.h"
+#import "RAUtils.h"
 //#import "RAOrderDetailViewController.h"
 
 @interface TFNavigationController ()
@@ -126,13 +127,30 @@
 }
 
 - (void)registNotification {
-    return;
+//    return;
 //    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveHandleOrderNotification:) name:RANotificationHandleOrder object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveHandleKickoutNotification:) name:RA_NOTIFICATION_KICKOUT object:nil];
 }
 //
-//- (void)receiveHandleOrderNotification:(NSNotification *)notification {
-//
+
+
+- (void)receiveHandleKickoutNotification:(NSNotification *)notification {
+
+
+    [self popToRootViewControllerAnimated:true];
+    [RASingleton.sharedInstance logout];
+    [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_LOGOUT object:nil];
+
+    NSLog(@"show kick out alert");
+                [RAUtils message_alert:notification.object title:@"Warrning" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
+//                    [vc.navigationController popToRootViewControllerAnimated:true];
+                } completion:^{
+    
+    
+                            }];
+    
+    
+    
 //    return;
 //    NSDictionary *userInfo = notification.userInfo;
 //    NSDictionary *aps = [userInfo objectForKey:@"aps"];
@@ -179,7 +197,7 @@
 //        }
 //
 //    }
-//}
+}
 //
 //- (void)pushDetailViewControllerForOrderID:(NSString *)orderID type:(NSInteger)type type2:(NSString *)type2 statusNo:(NSString *)statusNo {
 //    return;

+ 1 - 0
RA TradeFiling/RA TradeFiling/const.h

@@ -16,6 +16,7 @@
 
 
 
+
 #define APGRAYCOLOR [UIColor colorWithRed:53 / 255.0 green:53 / 255.0 blue:55 / 255.0 alpha:1.0]
 
 

+ 4 - 0
common/RAUtils.m

@@ -600,6 +600,7 @@
 {
     UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
     [parent presentViewController:alertController animated:YES completion:completion];
+    NSLog(@"show waiting alert %p",alertController);
     return alertController;
 
 }
@@ -619,6 +620,7 @@
     UIAlertAction *action_0 = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
     [alertController addAction:action_0];
     [vc presentViewController:alertController animated:YES completion:nil];
+    NSLog(@"show message alert %p",alertController);
     return alertController;
 
 }
@@ -638,6 +640,7 @@
     UIAlertAction *action_0 = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:action_handler];
     [alertController addAction:action_0];
     [vc presentViewController:alertController animated:YES completion:completion];
+    NSLog(@"show message alert %p",alertController);
     return alertController;
 
 }
@@ -1035,6 +1038,7 @@ done:
         [alertVC addAction:okAction];
         
         [vc presentViewController:alertVC animated:YES completion:nil];
+        NSLog(@"show alerttitle alert %p",alertVC);
     }
     
 }

+ 4 - 0
common/common_const.h

@@ -69,5 +69,9 @@
 #define MSG_LOGIN_DEVICE @"You are currently signed in on another device. Please check."
 #define MSG_TIMEOUT @"Request timeout."
 
+//
+
+#define RA_NOTIFICATION_KICKOUT @"RA_NOTIFICATION_KICKOUT"
+
 
 #endif /* common_const_h */

+ 2 - 0
common/customUI/commoneditor/CommonEditorViewController.h

@@ -56,6 +56,8 @@
 @property bool resize;
 @property int ioffset;
 @property int keyboard_h;
+@property (strong,nonatomic) UIAlertController* alert;
+ 
 @property (strong,nonatomic) NSMutableDictionary* requried;
 //@property (strong,nonatomic) NSLock *switchlock ;
 

+ 39 - 6
common/customUI/commoneditor/CommonEditorViewController.m

@@ -277,6 +277,13 @@
 {
     [super viewWillDisappear:animated];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
+    
+if(!self.alert.isBeingDismissed)
+{
+    
+    [self.alert dismissViewControllerAnimated:YES completion:nil];
+    NSLog(@"alert dismiss by viewwillDisapper %p",self.alert);
+}
 }
 
 -(void)manually_refresh
@@ -419,7 +426,7 @@
                 
                     
                 [waitalert dismissViewControllerAnimated:YES completion:^{
-                    if([[editor_json valueForKey:@"result"] intValue]==2)
+                    if([[editor_json valueForKey:@"result"] intValue]==RESULT_TRUE)
                     {
                         NSArray* arr_menu =editor_json[@"menu"];
                         
@@ -445,6 +452,10 @@
                         
                         weakself.navigationItem.title =  [weakself.content_data_download valueForKey:@"title"] ;
                     }
+                    else if([[editor_json valueForKey:@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
+                    {
+                        [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:nil];
+                    }
                     else
                     {
                         [weakself download_failed];
@@ -462,6 +473,7 @@
 
         }];
         
+        self.alert = waitalert;
                 
     }
     else if(self.url_type== URL_LOCAL )
@@ -1395,6 +1407,7 @@
                 DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
                 
                 [waitalert dismissViewControllerAnimated:YES completion:^{
+                    NSLog(@"alert dismiss by network return %p",waitalert);
                     if([[editor_json valueForKey:@"result"] intValue]==2)
                     {
                         if(!discardDirty)
@@ -1410,6 +1423,10 @@
                         [weakself.editorTable reloadData];
                         
                     }
+                    else if([[editor_json valueForKey:@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
+                    {
+                        [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:editor_json[@"err_msg"]];
+                    }
                     else
                     {
                         [weakself download_failed];
@@ -1428,7 +1445,7 @@
             
 
         }];
-        
+        self.alert = waitalert;
        
     }
     else
@@ -2614,6 +2631,10 @@
                             }
                             
                             
+                        }
+                        else if([[editor_json valueForKey:@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
+                        {
+                            [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:nil];
                         }
                         else
                         {
@@ -2629,7 +2650,7 @@
 
             }];
             
-            
+            self.alert = waitalert;
             //            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
 //                NSDictionary* editor_json = [RANetwork commoneditor_partialrefresh:params url:url];
@@ -2768,6 +2789,10 @@
                             }
                             
                         }
+                        else if([[editor_json valueForKey:@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
+                        {
+                            [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:nil];
+                        }
                         else
                         {
                             [RAUtils message_alert:[editor_json valueForKey:@"err_msg"] title:nil controller:weakself] ;
@@ -2781,7 +2806,7 @@
                 }];
 
             }];
-            
+            self.alert = waitalert;
             
             //            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
@@ -3842,7 +3867,11 @@
                             cell.labelAction.textColor= [UIColor lightGrayColor];
                             
                         }
-                        
+                        else
+                        {
+                            cell.labelAction.textColor= [UIColor blackColor];
+                            
+                        }
                         NSMutableString* title = [[item_json valueForKey:@"aname"] mutableCopy];
                         NSString* value =[item_json valueForKey:@"value"];
                         if([required isEqualToString:@"true"])
@@ -5074,6 +5103,10 @@
                                     cell.imageviewSignature.image = signimg;
                                     
                                     
+                                }
+                                else if([[json valueForKey:@"result"] intValue]==RESULT_LOGIN_ON_OTHER_DEVICE)
+                                {
+                                    [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_KICKOUT object:nil];
                                 }
                                 else
                                 {
@@ -5089,7 +5122,7 @@
 
                 }];
                 
-                                
+                self.alert = waitalert;
                 
                 
 //                AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;

+ 5 - 1
common/customUI/commoneditor/EnumSelectOnlineViewController.m

@@ -676,7 +676,11 @@
                     
                 });
                 
-            } else {
+            }else if (resultcode == RESULT_LOGIN_ON_OTHER_DEVICE)
+            {
+                return;
+            }
+            else {
                 
                 NSString *msg = [json objectForKey:@"err_msg"];
                 if(msg.length==0)