You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by br...@apache.org on 2012/09/25 22:14:00 UTC
[2/8] ios commit: Cleanups suggested by Andrew Grieve.
Cleanups suggested by Andrew Grieve.
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/0f006eca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/0f006eca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/0f006eca
Branch: refs/heads/master
Commit: 0f006ecaf8dff735f67e2e2f6966104af8a7491d
Parents: 8fd987e
Author: Braden Shepherdson <br...@chromium.org>
Authored: Tue Sep 25 16:12:57 2012 -0400
Committer: Braden Shepherdson <br...@chromium.org>
Committed: Tue Sep 25 16:12:57 2012 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVConnection.m | 4 ++--
CordovaLib/Classes/CDVFileTransfer.m | 4 +---
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/0f006eca/CordovaLib/Classes/CDVConnection.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConnection.m b/CordovaLib/Classes/CDVConnection.m
index 9f648d1..9a7b392 100644
--- a/CordovaLib/Classes/CDVConnection.m
+++ b/CordovaLib/Classes/CDVConnection.m
@@ -152,8 +152,8 @@
- (void)onReset
{
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:kReachabilityChangedNotification object:nil];
+ // Update the value cached in Javascript after a reset, because it would have been lost on navigation.
+ [self performSelector:@selector(updateOnlineStatus) withObject:nil afterDelay:1.0];
}
@end
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/0f006eca/CordovaLib/Classes/CDVFileTransfer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVFileTransfer.m b/CordovaLib/Classes/CDVFileTransfer.m
index 652546b..c573642 100644
--- a/CordovaLib/Classes/CDVFileTransfer.m
+++ b/CordovaLib/Classes/CDVFileTransfer.m
@@ -396,9 +396,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
- (void)onReset
{
for (CDVFileTransferDelegate* delegate in [activeTransfers allValues]) {
- if (delegate != nil) {
- [delegate.connection cancel];
- }
+ [delegate.connection cancel];
}
[activeTransfers removeAllObjects];
}