Skip to content

Commit

Permalink
Merge pull request #12 from Telerik-Verified-Plugins/master
Browse files Browse the repository at this point in the history
String comparison: equals vs ==
  • Loading branch information
Paldom committed Dec 13, 2014
2 parents b6cbcfc + 30d99da commit f9cf4f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/android/SpinnerDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@ public class SpinnerDialog extends CordovaPlugin {
public SpinnerDialog() {
}

public boolean execute(String action, JSONArray args,
final CallbackContext callbackContext) throws JSONException {
public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
if (action.equals("show")) {

final String title = args.getString(0) == "null" ? null : args
.getString(0);
final String message = args.getString(1) == "null" ? null : args
.getString(1);
final boolean isFixed = args.getBoolean(2);
final String title = "null".equals(args.getString(0)) ? null : args.getString(0);
final String message = "null".equals(args.getString(1)) ? null : args.getString(1);
final boolean isFixed = args.getBoolean(2);

final CordovaInterface cordova = this.cordova;
Runnable runnable = new Runnable() {
Expand Down Expand Up @@ -78,4 +75,4 @@ public void run() {
return true;
}

}
}
2 changes: 1 addition & 1 deletion src/ios/CDVSpinnerDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ @implementation CDVSpinnerDialog
@synthesize messageView = _messageView;

-(CGRect)rectForView {
if ((NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
if ((NSFoundationVersionNumber <= 1047.25 /* 7.1 */) && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.height, [UIScreen mainScreen].bounds.size.width);
}
return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height);
Expand Down

0 comments on commit f9cf4f0

Please sign in to comment.