Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Commit

Permalink
Merge pull request #67 from hassellof/master
Browse files Browse the repository at this point in the history
Reset www folder on both upgrades and downgrades of application. Thanks to @hassellof .
  • Loading branch information
nikDemyankov committed Dec 14, 2015
2 parents 30866bb + db723a0 commit 97eaaef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ private boolean isWwwFolderExists() {
* @return <code>true</code> if application was update; <code>false</code> - otherwise
*/
private boolean isApplicationHasBeenUpdated() {
return pluginInternalPrefs.getAppBuildVersion() < VersionHelper.applicationVersionCode(cordova.getActivity());
return pluginInternalPrefs.getAppBuildVersion() != VersionHelper.applicationVersionCode(cordova.getActivity());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ios/HCPPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ - (void)loadApplicationConfig {
*/
- (BOOL)isWWwFolderNeedsToBeInstalled {
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isApplicationUpdated = [NSBundle applicationBuildVersion] > _pluginInternalPrefs.appBuildVersion;
BOOL isApplicationUpdated = [NSBundle applicationBuildVersion] != _pluginInternalPrefs.appBuildVersion;
BOOL isWWwFolderExists = [fileManager fileExistsAtPath:_filesStructure.wwwFolder.path];
BOOL isWWwFolderInstalled = _pluginInternalPrefs.isWwwFolderInstalled;

Expand Down

0 comments on commit 97eaaef

Please sign in to comment.