Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit d206f03

Browse files
committed
(chore): Missed some spacings
1 parent 582f079 commit d206f03

File tree

1 file changed

+35
-40
lines changed

1 file changed

+35
-40
lines changed

firebase.ios.js

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,17 @@ firebase.addAppDelegateMethods = function (appDelegate) {
128128
var result = false;
129129
if (typeof(FBSDKApplicationDelegate) !== "undefined") {
130130
result = FBSDKApplicationDelegate.sharedInstance().applicationOpenURLSourceApplicationAnnotation(
131-
application,
132-
url,
133-
options.valueForKey(UIApplicationOpenURLOptionsSourceApplicationKey),
134-
options.valueForKey(UIApplicationOpenURLOptionsAnnotationKey));
131+
application,
132+
url,
133+
options.valueForKey(UIApplicationOpenURLOptionsSourceApplicationKey),
134+
options.valueForKey(UIApplicationOpenURLOptionsAnnotationKey));
135135
}
136136

137137
if (typeof(GIDSignIn) !== "undefined") {
138138
result = result || GIDSignIn.sharedInstance().handleURLSourceApplicationAnnotation(
139-
url,
140-
options.valueForKey(UIApplicationOpenURLOptionsSourceApplicationKey),
141-
options.valueForKey(UIApplicationOpenURLOptionsAnnotationKey));
139+
url,
140+
options.valueForKey(UIApplicationOpenURLOptionsSourceApplicationKey),
141+
options.valueForKey(UIApplicationOpenURLOptionsAnnotationKey));
142142
}
143143

144144
if (typeof(FIRDynamicLink) !== "undefined") {
@@ -857,7 +857,7 @@ firebase.admob._getBannerType = function (size) {
857857
return {"size": {"width": 300, "height": 250}, "flags": 0};
858858
} else if (size == firebase.admob.AD_SIZE.FULL_BANNER) {
859859
// return kGADAdSizeFullBanner;
860-
return {"size": {"width": 468,"height": 60}, "flags": 0};
860+
return {"size": {"width": 468, "height": 60}, "flags": 0};
861861
} else if (size == firebase.admob.AD_SIZE.LEADERBOARD) {
862862
// return kGADAdSizeLeaderboard;
863863
return {"size": {"width": 728, "height": 90}, "flags": 0};
@@ -869,10 +869,10 @@ firebase.admob._getBannerType = function (size) {
869869
var isIPad = platform.device.deviceType === DeviceType.Tablet;
870870
if (orientation == UIDeviceOrientation.UIDeviceOrientationPortrait || orientation == UIDeviceOrientation.UIDeviceOrientationPortraitUpsideDown) {
871871
// return kGADAdSizeSmartBannerPortrait;
872-
return {"size": {"width": 0,"height": 0,"smartHeight": isIPad ? 90 : 50}, "flags": 18};
872+
return {"size": {"width": 0, "height": 0, "smartHeight": isIPad ? 90 : 50}, "flags": 18};
873873
} else {
874874
// return kGADAdSizeSmartBannerLandscape;
875-
return {"size": {"width": 0,"height": 0, "smartHeight": isIPad ? 90 : 32}, "flags": 26};
875+
return {"size": {"width": 0, "height": 0, "smartHeight": isIPad ? 90 : 32}, "flags": 26};
876876
}
877877
} else {
878878
// return kGADAdSizeInvalid;
@@ -913,7 +913,7 @@ firebase.getRemoteConfig = function (arg) {
913913
var onCompletion = function (remoteConfigFetchStatus, error) {
914914

915915
if (remoteConfigFetchStatus == FIRRemoteConfigFetchStatusSuccess ||
916-
remoteConfigFetchStatus == FIRRemoteConfigFetchStatusThrottled) {
916+
remoteConfigFetchStatus == FIRRemoteConfigFetchStatusThrottled) {
917917

918918
var activated = firebaseRemoteConfig.activateFetched();
919919

@@ -1032,14 +1032,9 @@ function toLoginResult(user) {
10321032
var pid = firUserInfo.valueForKey("providerID");
10331033
if (pid === 'facebook.com') { // FIRFacebookAuthProviderID
10341034
var fbCurrentAccessToken = FBSDKAccessToken.currentAccessToken();
1035-
providers.push({
1036-
id: pid,
1037-
token: fbCurrentAccessToken ? fbCurrentAccessToken.tokenString : null
1038-
});
1035+
providers.push({id: pid, token: fbCurrentAccessToken ? fbCurrentAccessToken.tokenString : null});
10391036
} else {
1040-
providers.push({
1041-
id: pid
1042-
});
1037+
providers.push({id: pid});
10431038
}
10441039
}
10451040

@@ -1182,18 +1177,18 @@ firebase.login = function (arg) {
11821177
fAuth.signInWithCustomTokenCompletion(arg.customOptions.token, onCompletion);
11831178
} else if (arg.customOptions.tokenProviderFn) {
11841179
arg.customOptions.tokenProviderFn()
1185-
.then(
1186-
function (token) {
1187-
fAuth.signInWithCustomTokenCompletion(token, onCompletion);
1188-
},
1189-
function (error) {
1190-
reject(error);
1191-
}
1192-
);
1180+
.then(
1181+
function (token) {
1182+
fAuth.signInWithCustomTokenCompletion(token, onCompletion);
1183+
},
1184+
function (error) {
1185+
reject(error);
1186+
}
1187+
);
11931188
}
11941189

11951190
} else if (arg.type === firebase.LoginType.FACEBOOK) {
1196-
if (typeof(FBSDKLoginManager) === "undefined") {
1191+
if (typeof (FBSDKLoginManager) === "undefined") {
11971192
reject("Facebook SDK not installed - see Podfile");
11981193
return;
11991194
}
@@ -1237,12 +1232,12 @@ firebase.login = function (arg) {
12371232
}
12381233

12391234
fbSDKLoginManager.logInWithReadPermissionsFromViewControllerHandler(
1240-
scope,
1241-
null, // the viewcontroller param can be null since by default topmost is taken
1242-
onFacebookCompletion);
1235+
scope,
1236+
null, // the viewcontroller param can be null since by default topmost is taken
1237+
onFacebookCompletion);
12431238

12441239
} else if (arg.type === firebase.LoginType.GOOGLE) {
1245-
if (typeof(GIDSignIn) === "undefined") {
1240+
if (typeof (GIDSignIn) === "undefined") {
12461241
reject("Google Sign In not installed - see Podfile");
12471242
return;
12481243
}
@@ -1556,15 +1551,15 @@ firebase.addValueEventListener = function (updateCallback, path) {
15561551
where = firebase.instance.childByAppendingPath(path);
15571552
}
15581553
var listener = where.observeEventTypeWithBlockWithCancelBlock(
1559-
FIRDataEventType.FIRDataEventTypeValue,
1560-
function (snapshot) {
1561-
updateCallback(firebase.getCallbackData('ValueChanged', snapshot));
1562-
},
1563-
function (firebaseError) {
1564-
updateCallback({
1565-
error: firebaseError.localizedDescription
1554+
FIRDataEventType.FIRDataEventTypeValue,
1555+
function (snapshot) {
1556+
updateCallback(firebase.getCallbackData('ValueChanged', snapshot));
1557+
},
1558+
function (firebaseError) {
1559+
updateCallback({
1560+
error: firebaseError.localizedDescription
1561+
});
15661562
});
1567-
});
15681563
resolve({
15691564
path: path,
15701565
listeners: [listener]
@@ -1750,7 +1745,7 @@ firebase.query = function (updateCallback, path, options) {
17501745

17511746
if (options.singleEvent) {
17521747
query.observeSingleEventOfTypeWithBlock(FIRDataEventType.FIRDataEventTypeValue, function (snapshot) {
1753-
if (updateCallback) updateCallback(firebase.getCallbackData('ValueChanged', snapshot));
1748+
if(updateCallback) updateCallback(firebase.getCallbackData('ValueChanged', snapshot));
17541749
// resolve promise with data in case of single event, see https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/126
17551750
resolve(firebase.getCallbackData('ValueChanged', snapshot));
17561751
});

0 commit comments

Comments
 (0)