You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/06/13 23:40:20 UTC

ios commit: Fixes CB-915 - Pause/resume events get fired twice

Updated Branches:
  refs/heads/master 0d457d915 -> 49fc7e600


Fixes CB-915 - Pause/resume events get fired twice


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/49fc7e60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/49fc7e60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/49fc7e60

Branch: refs/heads/master
Commit: 49fc7e60076286e16cb485a0d7f79202efa829a4
Parents: 0d457d9
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Jun 13 14:40:11 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Jun 13 14:40:11 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/49fc7e60/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index afb3bc8..72dfde6 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -34,6 +34,7 @@
 
 @property (nonatomic, readwrite, retain) IBOutlet UIActivityIndicatorView* activityView;
 @property (nonatomic, readwrite, retain) UIImageView* imageView;
+@property (readwrite, assign) BOOL initialized;
 
 @end
 
@@ -44,11 +45,11 @@
 @synthesize pluginObjects, pluginsMap, whitelist;
 @synthesize settings, loadFromString;
 @synthesize imageView, activityView, useSplashScreen, commandDelegate;
-@synthesize wwwFolderName, startPage, invokeString;
+@synthesize wwwFolderName, startPage, invokeString, initialized;
 
 - (id) __init
 {
-    if (self != nil) 
+    if (self != nil && !self.initialized) 
     {
         [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedOrientationChange) 
@@ -76,6 +77,7 @@
         
         [self printMultitaskingInfo];
         [self printDeprecationNotice];
+        self.initialized = YES;
     }
     
     return self;