diff --git a/android/app/google-services.json b/android/app/google-services.json
index dac2899..4b9ec28 100644
--- a/android/app/google-services.json
+++ b/android/app/google-services.json
@@ -1,21 +1,29 @@
{
"project_info": {
- "project_number": "213063202678",
- "firebase_url": "https://clique2-777a0.firebaseio.com",
- "project_id": "clique2-777a0",
- "storage_bucket": "clique2-777a0.appspot.com"
+ "project_number": "654951934306",
+ "firebase_url": "https://clique-c1fd6.firebaseio.com",
+ "project_id": "clique-c1fd6",
+ "storage_bucket": "clique-c1fd6.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:213063202678:android:8d4e41f333ad27fa",
+ "mobilesdk_app_id": "1:654951934306:android:8d4e41f333ad27fa",
"android_client_info": {
"package_name": "com.invertase.rnfirebasestarter"
}
},
"oauth_client": [
{
- "client_id": "213063202678-176davms5i1uk6ijh33v73tc6fqne3t0.apps.googleusercontent.com",
+ "client_id": "654951934306-l3ajp2ehkormsm8pk68b97j4pjms9jb5.apps.googleusercontent.com",
+ "client_type": 1,
+ "android_info": {
+ "package_name": "com.invertase.rnfirebasestarter",
+ "certificate_hash": "7611a37ac5e4d8861986db567cca8b78034450f6"
+ }
+ },
+ {
+ "client_id": "654951934306-lc3tg44rg3qsd61lm3697993aau0m144.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.invertase.rnfirebasestarter",
@@ -23,21 +31,36 @@
}
},
{
- "client_id": "213063202678-1nckieokmeje71n5eafu3jrve7tsp8f8.apps.googleusercontent.com",
+ "client_id": "654951934306-2qn8f00mc09eohh32dh9inp0in9el1ba.apps.googleusercontent.com",
+ "client_type": 1,
+ "android_info": {
+ "package_name": "com.invertase.rnfirebasestarter",
+ "certificate_hash": "82c1898d63745cd90d3113fd6af73aa7545b75a4"
+ }
+ },
+ {
+ "client_id": "654951934306-ck7rjpmcvvhhrfugnr7fmug5238m357q.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyDf0LaoODLp-lJVJAUr5cJxy0WFajzNFtA"
+ "current_key": "AIzaSyCnRhz83PVSR9RxRs0KMQ2yiaj1WfowYm4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
- "client_id": "213063202678-1nckieokmeje71n5eafu3jrve7tsp8f8.apps.googleusercontent.com",
+ "client_id": "654951934306-ck7rjpmcvvhhrfugnr7fmug5238m357q.apps.googleusercontent.com",
"client_type": 3
+ },
+ {
+ "client_id": "654951934306-u812skkn1db19je3bdg0bht698ssfgkj.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "org.reactjs.native.example.CliqueOrbital"
+ }
}
]
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1155a7a..76baa4c 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -8,7 +8,6 @@
-
@@ -35,6 +34,7 @@
+
diff --git a/android/app/src/main/java/com/invertase/rnfirebasestarter/MainApplication.java b/android/app/src/main/java/com/invertase/rnfirebasestarter/MainApplication.java
index e9df111..a0c3ab5 100644
--- a/android/app/src/main/java/com/invertase/rnfirebasestarter/MainApplication.java
+++ b/android/app/src/main/java/com/invertase/rnfirebasestarter/MainApplication.java
@@ -29,7 +29,7 @@
import io.invertase.firebase.firestore.RNFirebaseFirestorePackage;
import io.invertase.firebase.functions.RNFirebaseFunctionsPackage;
import io.invertase.firebase.instanceid.RNFirebaseInstanceIdPackage;
-import io.invertase.firebase.invites.RNFirebaseInvitesPackage;
+// import io.invertase.firebase.invites.RNFirebaseInvitesPackage;
import io.invertase.firebase.links.RNFirebaseLinksPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
@@ -73,7 +73,7 @@ protected List getPackages() {
new RNFirebaseFirestorePackage(),
new RNFirebaseFunctionsPackage(),
new RNFirebaseInstanceIdPackage(),
- new RNFirebaseInvitesPackage(),
+ // new RNFirebaseInvitesPackage(),
new RNFirebaseLinksPackage(),
new RNFirebaseMessagingPackage(),
new RNFirebaseNotificationsPackage(),
diff --git a/ios/RNFirebaseStarter.xcodeproj/project.pbxproj b/ios/RNFirebaseStarter.xcodeproj/project.pbxproj
index 803ed20..839a7b3 100644
--- a/ios/RNFirebaseStarter.xcodeproj/project.pbxproj
+++ b/ios/RNFirebaseStarter.xcodeproj/project.pbxproj
@@ -5,7 +5,6 @@
};
objectVersion = 46;
objects = {
-
/* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
diff --git a/ios/RNFirebaseStarter/Info.plist b/ios/RNFirebaseStarter/Info.plist
index 3222feb..23b615d 100644
--- a/ios/RNFirebaseStarter/Info.plist
+++ b/ios/RNFirebaseStarter/Info.plist
@@ -49,17 +49,17 @@
NSCameraUsageDescription
-
+
NSContactsUsageDescription
- Chat app that uses user's contacts
+ Chat app that uses user's contacts
NSLocationWhenInUseUsageDescription
-
+
NSMicrophoneUsageDescription
-
+
NSPhotoLibraryAddUsageDescription
-
+
NSPhotoLibraryUsageDescription
-
+
UIAppFonts
AntDesign.ttf
diff --git a/package-lock.json b/package-lock.json
index 2675dd5..7bbd9f5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,17 +13,17 @@
}
},
"@babel/core": {
- "version": "7.4.5",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz",
- "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==",
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.0.tgz",
+ "integrity": "sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw==",
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.4.4",
- "@babel/helpers": "^7.4.4",
- "@babel/parser": "^7.4.5",
+ "@babel/generator": "^7.5.0",
+ "@babel/helpers": "^7.5.0",
+ "@babel/parser": "^7.5.0",
"@babel/template": "^7.4.4",
- "@babel/traverse": "^7.4.5",
- "@babel/types": "^7.4.4",
+ "@babel/traverse": "^7.5.0",
+ "@babel/types": "^7.5.0",
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
@@ -33,6 +33,49 @@
"source-map": "^0.5.0"
},
"dependencies": {
+ "@babel/generator": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz",
+ "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==",
+ "requires": {
+ "@babel/types": "^7.5.0",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.11",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "@babel/parser": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz",
+ "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA=="
+ },
+ "@babel/traverse": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz",
+ "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==",
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/generator": "^7.5.0",
+ "@babel/helper-function-name": "^7.1.0",
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/parser": "^7.5.0",
+ "@babel/types": "^7.5.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.11"
+ }
+ },
+ "@babel/types": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz",
+ "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==",
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.11",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@@ -42,9 +85,9 @@
}
},
"ms": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
@@ -256,13 +299,71 @@
}
},
"@babel/helpers": {
- "version": "7.4.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz",
- "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==",
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.0.tgz",
+ "integrity": "sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg==",
"requires": {
"@babel/template": "^7.4.4",
- "@babel/traverse": "^7.4.4",
- "@babel/types": "^7.4.4"
+ "@babel/traverse": "^7.5.0",
+ "@babel/types": "^7.5.0"
+ },
+ "dependencies": {
+ "@babel/generator": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz",
+ "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==",
+ "requires": {
+ "@babel/types": "^7.5.0",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.11",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "@babel/parser": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz",
+ "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA=="
+ },
+ "@babel/traverse": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz",
+ "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==",
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/generator": "^7.5.0",
+ "@babel/helper-function-name": "^7.1.0",
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/parser": "^7.5.0",
+ "@babel/types": "^7.5.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.11"
+ }
+ },
+ "@babel/types": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz",
+ "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==",
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.11",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ }
}
},
"@babel/highlight": {
@@ -704,9 +805,9 @@
}
},
"@babel/runtime": {
- "version": "7.4.5",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz",
- "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==",
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz",
+ "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==",
"requires": {
"regenerator-runtime": "^0.13.2"
},
@@ -2456,9 +2557,9 @@
}
},
"@react-native-community/async-storage": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.4.2.tgz",
- "integrity": "sha512-gDQENh7uPLGPKbRFI07GiUXZPhm2j17K4FT308OwAmIiOKbfO/cxy0sCWB0YzD/SLw9F3D9tLBRPJY6GG9YZLw=="
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.5.0.tgz",
+ "integrity": "sha512-2yE4RzQ5IL+UTPhuMY0ykNRKHf1m90jOnmp8fcDPUun5U97cXlorjI4p66ovDgF0FuOv8ZpiUKvunGy3qqBxwg=="
},
"@react-native-community/cli": {
"version": "1.9.7",
@@ -4281,6 +4382,32 @@
}
}
},
+ "expo-constants": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-5.0.1.tgz",
+ "integrity": "sha512-Ny3teALKaE/jFzBg6DHr2GOoHpwQ/OLs3q3VugZOoR6hXCeVcCEP9MyNvhgn/cheeBDAa6UIgarv2Yufb5RMqQ==",
+ "requires": {
+ "ua-parser-js": "^0.7.19"
+ }
+ },
+ "expo-image-picker": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/expo-image-picker/-/expo-image-picker-5.0.2.tgz",
+ "integrity": "sha512-6Lf0rd21JhcOxL0ThL0VLewaR0w8SZ/49FYFsyx/XGpo6CSqu9AOZrS11BnVqlwHPaiS4OPsFSlO4IhEF72mFQ=="
+ },
+ "expo-location": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/expo-location/-/expo-location-5.0.1.tgz",
+ "integrity": "sha512-YXMrPuYlLfqcHxKjwdc99XjCpeJYWtxu6kqaM9f++u/zjeup95YNnlzeq8uD7YhNuWk8O6boVAFTSXPn9bY+9w==",
+ "requires": {
+ "invariant": "^2.2.4"
+ }
+ },
+ "expo-permissions": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/expo-permissions/-/expo-permissions-5.0.1.tgz",
+ "integrity": "sha512-cOg9f9TaV8grORTwLSuoPfviDGcJSALjaALvxdmQD5ujPW6lxO6Ofd/s4/dV4L3lJww4HXiurjPJnT5yo+3ydw=="
+ },
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -4553,7 +4680,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -4571,11 +4699,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -4588,15 +4718,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -4699,7 +4832,8 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -4709,6 +4843,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -4721,17 +4856,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -4748,6 +4886,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -4820,7 +4959,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -4830,6 +4970,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -4905,7 +5046,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -4935,6 +5077,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -4952,6 +5095,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -4990,11 +5134,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -5299,6 +5445,12 @@
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.6.3.tgz",
"integrity": "sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA=="
},
+ "immutable": {
+ "version": "3.8.2",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz",
+ "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=",
+ "optional": true
+ },
"import-fresh": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
@@ -9752,9 +9904,9 @@
}
},
"react-native-calendars": {
- "version": "1.187.0",
- "resolved": "https://registry.npmjs.org/react-native-calendars/-/react-native-calendars-1.187.0.tgz",
- "integrity": "sha512-g/Ge4kf67rz5CQpe6SopJpMvh9yRs++CNIyCK8z4MzebEagmtiMCUgxR4k4TodLAQnyLKmg5/zwqqhF1Fta5Ew==",
+ "version": "1.195.0",
+ "resolved": "https://registry.npmjs.org/react-native-calendars/-/react-native-calendars-1.195.0.tgz",
+ "integrity": "sha512-bPLAHxuEnIUjFww7f3LdZ3WNFbJvlhZWAlTHxt6tdJEwX45dLwrVlUVzOEt/gyVnCZyNYFTcKD6dlIVGXZZhoQ==",
"requires": {
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
@@ -9815,17 +9967,17 @@
}
},
"react-native-fast-image": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/react-native-fast-image/-/react-native-fast-image-6.0.3.tgz",
- "integrity": "sha512-49OdbWV0XD2mb5VTdLRJCQ9qpMgGdliRwHSue/aJxgLLLmDK6dmFIJ/LvEn0F9e5Je16K++5lS6yJAACvvxAfw=="
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/react-native-fast-image/-/react-native-fast-image-6.1.1.tgz",
+ "integrity": "sha512-9bYUY8GLKpuTF9WOC28VM/ceH0+GyV60g3bcwYeiq0A+oDBVyVlj/ovMaJqRxHII6GQYX0WbTkiT5kWtPCtWkA=="
},
"react-native-firebase": {
- "version": "5.4.2",
- "resolved": "https://registry.npmjs.org/react-native-firebase/-/react-native-firebase-5.4.2.tgz",
- "integrity": "sha512-xeluQo/dDYGKPvPLL0CH51T+rPVkKmEoR/aYDTDgJXXgiDwqSGAq9v414uF4p6SALLCDcNeb4IA6HA8TcFKcrQ==",
+ "version": "5.5.4",
+ "resolved": "https://registry.npmjs.org/react-native-firebase/-/react-native-firebase-5.5.4.tgz",
+ "integrity": "sha512-D7eGeVb9M69se98Munziqmy6kQ+ymgNtHqFB6lrHRdVLnUd5v0caI6iQ/kY8zrqVUD+lU3Sui2+Lm9qHZUhbDw==",
"requires": {
"opencollective-postinstall": "^2.0.0",
- "prop-types": "^15.6.2"
+ "prop-types": "^15.7.2"
}
},
"react-native-gesture-handler": {
@@ -9846,17 +9998,22 @@
}
},
"react-native-gifted-chat": {
- "version": "0.9.3",
- "resolved": "https://registry.npmjs.org/react-native-gifted-chat/-/react-native-gifted-chat-0.9.3.tgz",
- "integrity": "sha512-boIXJ9cvplzJhszQOYOqHXjR5m4vx1QWGQBdxC25aYQbsfWcQHJzZ7dUuNBeJBfS7flBKt6pLwX/TVkJ+7soOA==",
+ "version": "0.9.11",
+ "resolved": "https://registry.npmjs.org/react-native-gifted-chat/-/react-native-gifted-chat-0.9.11.tgz",
+ "integrity": "sha512-2ytloWx2+PIuTBBNwj3tSrtuD03bXzHkfg1ZN1fM6iOLpeKWWiKgSlUm7D/ylmFhOsOGrAdhscFYBB/y7IkE5w==",
"requires": {
"@expo/react-native-action-sheet": "^2.0.1",
+ "expo-constants": "~5.0.1",
+ "expo-image-picker": "~5.0.2",
+ "expo-location": "~5.0.1",
+ "expo-permissions": "~5.0.1",
"moment": "^2.19.0",
"react-native-communications": "2.2.1",
"react-native-iphone-x-helper": "^1.2.0",
"react-native-lightbox": "^0.7.0",
+ "react-native-maps": "~0.24.0",
"react-native-parsed-text": "^0.0.20",
- "react-native-video": "4.4.1",
+ "react-native-video": "4.4.2",
"uuid": "3.3.0"
},
"dependencies": {
@@ -9930,6 +10087,15 @@
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz",
"integrity": "sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ=="
},
+ "react-native-keyboard-aware-scroll-view": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.8.0.tgz",
+ "integrity": "sha512-gPfhgHQI/z7Cc5aeNOEmK0b250QkAeU6V+4oH8EC7mmFneEKn6MAIDjpoiwqt6bV+lFJPABXfx9MtrRmtCeJ/Q==",
+ "requires": {
+ "prop-types": "^15.6.2",
+ "react-native-iphone-x-helper": "^1.0.3"
+ }
+ },
"react-native-lightbox": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/react-native-lightbox/-/react-native-lightbox-0.7.0.tgz",
@@ -9938,33 +10104,27 @@
"prop-types": "^15.5.10"
}
},
+ "react-native-maps": {
+ "version": "0.24.2",
+ "resolved": "https://registry.npmjs.org/react-native-maps/-/react-native-maps-0.24.2.tgz",
+ "integrity": "sha512-1iNIDikp2dkCG+8DguaEviYZiMSYyvwqYT7pO2YTZvuFRDSc/P9jXMhTUnSh4wNDlEeQ47OJ09l0pwWVBZ7wxg=="
+ },
"react-native-modal": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/react-native-modal/-/react-native-modal-11.0.1.tgz",
- "integrity": "sha512-qXKRCFj28uJ1AopMPwf4HssscZ4LwTCY+PlDKnXERdxrbGK626rduj4fHyLXSZ1xJvrDy8doHqVAYoQ9YuObgQ==",
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/react-native-modal/-/react-native-modal-11.1.0.tgz",
+ "integrity": "sha512-gSD21evs2m+C/vtRS+R/I1ZuIN5td+K+I9Dt04HpBzux3HyA9km2oonQy8t+EKUNN2rFYjFntfUOMmb3vj7i8A==",
"requires": {
"prop-types": "^15.6.2",
"react-native-animatable": "^1.3.1"
}
},
"react-native-modal-datetime-picker": {
- "version": "7.4.2",
- "resolved": "https://registry.npmjs.org/react-native-modal-datetime-picker/-/react-native-modal-datetime-picker-7.4.2.tgz",
- "integrity": "sha512-RzQiYvbtBE/FJdaPhFcyc4tjw4LZ6AuE3uWPRqiTy4WSoE9pGV1QzrJzPIYhrJfmKWLF72ntnzG8uQyUAx/Znw==",
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/react-native-modal-datetime-picker/-/react-native-modal-datetime-picker-7.5.0.tgz",
+ "integrity": "sha512-TtFS27IGhtg89LnIYIa8FrpNWbQENLiAAdfJPDdskv5VqIKgZSA0toOFYaAMRLeMiB8Urpf2/sAf0rdooCzu+g==",
"requires": {
"prop-types": "^15.7.2",
- "react-native-modal": "^9.0.0"
- },
- "dependencies": {
- "react-native-modal": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/react-native-modal/-/react-native-modal-9.0.0.tgz",
- "integrity": "sha512-j4xeIK9noHU/ksp2Ndc8NI1qJvjApToqGvqLEu2wtYeaISanbhtd0S3V4hZkSlCa3DZtegl6aaMZBLeH1q6xfA==",
- "requires": {
- "prop-types": "^15.6.2",
- "react-native-animatable": "^1.2.4"
- }
- }
+ "react-native-modal": "^11.0.2"
}
},
"react-native-parsed-text": {
@@ -10034,9 +10194,9 @@
}
},
"react-native-vector-icons": {
- "version": "6.4.2",
- "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.4.2.tgz",
- "integrity": "sha512-G7Y5HksOQkCanFWKJ+fjwP38XL8tQREOSnw7jrbq28AFrrv41YtafOF4uDSDS7HxMRXs17HeEzn24OzJb63iuA==",
+ "version": "6.6.0",
+ "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.6.0.tgz",
+ "integrity": "sha512-MImKVx8JEvVVBnaShMr7/yTX4Y062JZMupht1T+IEgbqBj4aQeQ1z2SH4VHWKNtWtppk4kz9gYyUiMWqx6tNSw==",
"requires": {
"lodash": "^4.0.0",
"prop-types": "^15.6.2",
@@ -10209,9 +10369,9 @@
}
},
"yargs-parser": {
- "version": "13.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.0.tgz",
- "integrity": "sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA==",
+ "version": "13.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
+ "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
@@ -10220,9 +10380,9 @@
}
},
"react-native-video": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/react-native-video/-/react-native-video-4.4.1.tgz",
- "integrity": "sha512-gTZKRqa4NkEBx6t6iAzTFlgxDY23IZW/8YClR0hMzhOD0/9I/AzOBBaOXDyFeKj4EQF+uZ/LUS3r+oDnz1ks5w==",
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/react-native-video/-/react-native-video-4.4.2.tgz",
+ "integrity": "sha512-bF17FOSTdrFHeUmN6t4cCa0kLaJT3uzYw1rCzvHFEdkCmdTG4Kcin/cfJ2E29jFViqw2uBPfW6m1y2yI2cgOCQ==",
"requires": {
"keymirror": "^0.1.1",
"prop-types": "^15.5.10",
@@ -10282,11 +10442,11 @@
}
},
"react-redux": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.0.3.tgz",
- "integrity": "sha512-vYZA7ftOYlDk3NetitsI7fLjryt/widNl1SLXYvFenIpm7vjb4ryK0EeFrgn62usg5fYkyIAWNUPKnwWPevKLg==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.1.0.tgz",
+ "integrity": "sha512-hyu/PoFK3vZgdLTg9ozbt7WF3GgX5+Yn3pZm5/96/o4UueXA+zj08aiSC9Mfj2WtD1bvpIb3C5yvskzZySzzaw==",
"requires": {
- "@babel/runtime": "^7.4.3",
+ "@babel/runtime": "^7.4.5",
"hoist-non-react-statics": "^3.3.0",
"invariant": "^2.2.4",
"loose-envify": "^1.4.0",
@@ -10384,13 +10544,14 @@
}
},
"redux-form": {
- "version": "8.2.3",
- "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-8.2.3.tgz",
- "integrity": "sha512-AHuhaAoG6bH6t9xfsZA6ZxK9M/QF0GN+AfoRaQzP5o+ZINIiCEUS3ThgAEDbZPvqwuem/WQdtoc0P9HcXvEelA==",
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-8.2.4.tgz",
+ "integrity": "sha512-+MMD5XWVUgrtgXBuQiIYtHstPT7Lz0Izuc6vqBr1S9+7HbGgvJg4V5qDr2nigE1V5hKgsqnoAmWOWtzXc9ErZA==",
"requires": {
"@babel/runtime": "^7.2.0",
"es6-error": "^4.1.1",
"hoist-non-react-statics": "^3.2.1",
+ "immutable": "*",
"invariant": "^2.2.4",
"is-promise": "^2.1.0",
"lodash": "^4.17.11",
@@ -11279,9 +11440,9 @@
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
"shaka-player": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/shaka-player/-/shaka-player-2.5.1.tgz",
- "integrity": "sha512-5P1bnWQ3LTiNbt7nyf75btGAPCWW3lHRhti9Yl/yE+DowqRl8KcHkHR0t0OfERyRKO1lrPLrCjiVOgJhi9jbFw=="
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/shaka-player/-/shaka-player-2.5.3.tgz",
+ "integrity": "sha512-9HwdBXiMNglq2IcjTWCMIwv4s1gucyHEOYWc6YX5NcxyiyQfVP+VG3eADWJXgFv3RF3mma1YPKX83q0PbyxoAQ=="
},
"shebang-command": {
"version": "1.2.0",
@@ -11950,9 +12111,9 @@
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
"tslib": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
- "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
+ "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
},
"tunnel-agent": {
"version": "0.6.0",
diff --git a/package.json b/package.json
index 43ade95..48c55ee 100644
--- a/package.json
+++ b/package.json
@@ -12,38 +12,39 @@
"test": "jest"
},
"dependencies": {
- "@react-native-community/async-storage": "^1.4.2",
+ "@react-native-community/async-storage": "^1.5.0",
"@react-native-community/netinfo": "^3.2.1",
"lodash": "^4.17.11",
"react": "16.8.3",
"react-native": "0.59.3",
- "react-native-calendars": "^1.187.0",
+ "react-native-calendars": "^1.195.0",
"react-native-contacts": "^4.0.2",
"react-native-elements": "^1.1.0",
- "react-native-fast-image": "^6.0.3",
- "react-native-firebase": "^5.4.0",
+ "react-native-fast-image": "^6.1.1",
+ "react-native-firebase": "^5.5.4",
"react-native-gesture-handler": "^1.2.2",
- "react-native-gifted-chat": "^0.9.3",
+ "react-native-gifted-chat": "^0.9.11",
"react-native-image-cache-hoc": "^2.0.0",
"react-native-image-picker": "^0.28.1",
"react-native-image-resizer": "^1.0.1",
- "react-native-modal": "^11.0.1",
- "react-native-modal-datetime-picker": "^7.4.2",
+ "react-native-keyboard-aware-scroll-view": "^0.8.0",
+ "react-native-modal": "^11.1.0",
+ "react-native-modal-datetime-picker": "^7.5.0",
"react-native-splash-screen": "^3.2.0",
"react-native-swipeout": "^2.3.6",
- "react-native-vector-icons": "^6.4.2",
+ "react-native-vector-icons": "^6.6.0",
"react-navigation": "^3.11.0",
- "react-redux": "^7.0.3",
+ "react-redux": "^7.1.0",
"redux": "^4.0.1",
- "redux-form": "^8.2.3",
+ "redux-form": "^8.2.4",
"redux-persist": "^5.10.0",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.10.15",
- "tslib": "^1.9.3"
+ "tslib": "^1.10.0"
},
"devDependencies": {
- "@babel/core": "^7.4.3",
- "@babel/runtime": "^7.4.3",
+ "@babel/core": "^7.5.0",
+ "@babel/runtime": "^7.5.0",
"babel-jest": "^24.7.1",
"fs-extra": "^7.0.1",
"jest": "^24.7.1",
diff --git a/src/components/CalendarComponent.js b/src/components/CalendarComponent.js
index a9db884..08ad3ff 100644
--- a/src/components/CalendarComponent.js
+++ b/src/components/CalendarComponent.js
@@ -129,7 +129,7 @@ class CalendarComponent extends React.Component {
}
rowHasChanged(r1, r2) {
- return !(_.isEqual(r1, r2));
+ return !_.isEqual(r1, r2);
}
timeToString(time) {
@@ -195,14 +195,18 @@ const styles = StyleSheet.create({
const mapStateToProps = (state, ownProps) => {
let sortedEventsArr = [];
- if (ownProps.personal) { //personal calendar
+ if (ownProps.personal) {
+ //personal calendar
sortedEventsArr = state.calendar.personalEvents.sort((a, b) => {
return new Date(a.from).getTime() - new Date(b.from).getTime();
});
- } else { // group calendar
- sortedEventsArr = _.values(state.calendar.events[ownProps.groupID]).sort((a, b) => {
- return new Date(a.from).getTime() - new Date(b.from).getTime();
- });
+ } else {
+ // group calendar
+ sortedEventsArr = _.values(state.calendar.events[ownProps.groupID]).sort(
+ (a, b) => {
+ return new Date(a.from).getTime() - new Date(b.from).getTime();
+ }
+ );
}
const events = {};
@@ -219,7 +223,7 @@ const mapStateToProps = (state, ownProps) => {
events,
loadItems: () => this.events,
modalVisibility: state.eventModalReducer.modalVisibility
- }
+ };
// let events = {};
// if (!ownProps.groupID) {
@@ -239,6 +243,4 @@ const mapStateToProps = (state, ownProps) => {
// return { events };
};
-export default connect(
- mapStateToProps
-)(CalendarComponent);
+export default connect(mapStateToProps)(CalendarComponent);
diff --git a/src/screens/Auth/Auth.js b/src/screens/Auth/Auth.js
index dcb94dd..338e116 100644
--- a/src/screens/Auth/Auth.js
+++ b/src/screens/Auth/Auth.js
@@ -27,10 +27,6 @@ class Auth extends Component {
};
}
- componentWillUnmount() {
- if (this.unsubscribe) this.unsubscribe();
- }
-
signIn = () => {
this.setState({ loading: true });
const { phoneNumber } = this.state;
@@ -58,19 +54,21 @@ class Auth extends Component {
confirmResult
.confirm(codeInput)
.then(user => {
- const ref = firebase.database().ref("users");
- ref.on(
- "value",
- snapshot => {
- this.setState({ loading: false });
- this.props.navigation.navigate(
- snapshot.val()[user._user.uid] ? "App" : "UserDetails"
- );
- },
- err => {
- console.log("the read failed " + err.code);
- }
- );
+ firebase
+ .database()
+ .ref("users")
+ .once(
+ "value",
+ snapshot => {
+ this.setState({ loading: false });
+ this.props.navigation.navigate(
+ snapshot.val()[user._user.uid] ? "App" : "UserDetails"
+ );
+ },
+ err => {
+ console.log("the read failed " + err.code);
+ }
+ );
})
.catch(error => {
this.setState({ message: `Code Confirm Error: ${error.message}` });
@@ -200,8 +198,6 @@ class Auth extends Component {
{this.state.loading && !this.state.message && }
);
- } else {
- this.props.navigation.navigate("UserDetails");
}
return (
diff --git a/src/screens/Auth/AuthLoading.js b/src/screens/Auth/AuthLoading.js
index ff5171e..8b5e97b 100644
--- a/src/screens/Auth/AuthLoading.js
+++ b/src/screens/Auth/AuthLoading.js
@@ -4,7 +4,10 @@ import { connect } from "react-redux";
import { setUserDetails } from "../../store/actions/auth";
import { fetchGroups } from "../../store/actions/groups";
-import { fetchAllEvents, fetchPersonalEvents } from "../../store/actions/calendar";
+import {
+ fetchAllEvents,
+ fetchPersonalEvents
+} from "../../store/actions/calendar";
import { populateGroups } from "../../store/actions/messageCounter";
import NetInfo from "@react-native-community/netinfo";
@@ -12,24 +15,21 @@ import NetInfo from "@react-native-community/netinfo";
import LoadingView from "../../components/LoadingView";
class AuthLoading extends React.Component {
- // preload data (loading screen)
- async componentDidMount() {
- //firebase.auth().currentUser.delete();
- await firebase.auth().onAuthStateChanged(async user => {
+ componentDidMount() {
+ this.unsubscribe = firebase.auth().onAuthStateChanged(user => {
if (user) {
if (user.displayName && user.photoURL) {
- NetInfo.fetch().then(state => {
- if (state.isConnected) {
- this.props.setUserDetails(user);
- this.props
- .fetchGroups()
- .then(() => this.props.fetchAllEvents(user.uid))
- .then(() => this.props.fetchPersonalEvents(user.uid))
- .then(() => this.props.navigation.navigate("App"));
- } else {
- this.props.navigation.navigate("App");
- }
- });
+ NetInfo.fetch()
+ .then(state => {
+ if (state.isConnected) {
+ this.props.setUserDetails(user);
+ this.props
+ .fetchGroups()
+ .then(() => this.props.fetchAllEvents(user.uid))
+ .then(() => this.props.fetchPersonalEvents(user.uid));
+ }
+ })
+ .then(() => this.props.navigation.navigate("App"));
} else {
// get user to set username and profile picture
this.props.navigation.navigate("UserDetails");
@@ -41,6 +41,10 @@ class AuthLoading extends React.Component {
});
}
+ componentWillUnmount() {
+ this.unsubscribe();
+ }
+
render() {
return ;
}
diff --git a/src/screens/Auth/UserDetails.js b/src/screens/Auth/UserDetails.js
index 53b285f..c51435c 100644
--- a/src/screens/Auth/UserDetails.js
+++ b/src/screens/Auth/UserDetails.js
@@ -1,5 +1,5 @@
import React from "react";
-import { View, StyleSheet, TextInput, Dimensions } from "react-native";
+import { StyleSheet, Dimensions } from "react-native";
import { SafeAreaView } from "react-navigation";
import ImagePicker from "../../components/ImagePickerComponent";
import { connect } from "react-redux";
@@ -15,18 +15,14 @@ import Spinner from "../../components/Spinner";
class UserDetails extends React.Component {
state = { loading: false };
- handleSubmit = async values => {
+ handleSubmit = values => {
this.setState({ loading: true });
this.props
- .createAccount(
- values.username,
- values.profilepicture.uri,
- values.profilepicture.fileName.split(".")[1]
- )
+ .createAccount(values.username, values.profilepicture.uri)
.then(() => this.props.navigation.navigate("App"));
};
- renderInput = ({ input, label, meta }) => {
+ renderInput = ({ input, label }) => {
return ;
};
diff --git a/src/screens/Main/EventModal.js b/src/screens/Main/EventModal.js
index 9790c01..ace912e 100644
--- a/src/screens/Main/EventModal.js
+++ b/src/screens/Main/EventModal.js
@@ -20,7 +20,10 @@ import { cliqueBlue, getDate, getDay, getTime } from "../../assets/constants";
import firebase from "react-native-firebase";
import Text from "../../components/Text";
import MyIcon from "../../components/MyIcon";
-import { fetchPersonalEvents, fetchAllEvents } from "../../store/actions/calendar";
+import {
+ fetchPersonalEvents,
+ fetchAllEvents
+} from "../../store/actions/calendar";
class EventModal extends Component {
constructor(props) {
@@ -68,6 +71,8 @@ class EventModal extends Component {
name => name !== this.props.displayName
);
+ const db = firebase.database();
+
let updatedEvent;
if (response) {
updatedEvent = {
@@ -76,15 +81,17 @@ class EventModal extends Component {
notAttending,
noResponse
};
- firebase
- .database()
- .ref(`users/${this.props.uid}/attending/${this.props.event.groupID}/${event.eventID}`)
- .set(true)
- firebase
- .database()
- .ref(`users/${this.props.uid}/notAttending/${this.props.event.groupID}/${event.eventID}`)
- .remove()
- this.props.dispatch(fetchPersonalEvents(this.props.uid))
+ db.ref(
+ `users/${this.props.uid}/attending/${this.props.event.groupID}/${
+ event.eventID
+ }`
+ ).set(true);
+ db.ref(
+ `users/${this.props.uid}/notAttending/${this.props.event.groupID}/${
+ event.eventID
+ }`
+ ).remove();
+ this.props.dispatch(fetchPersonalEvents(this.props.uid));
attendingNames = [...attendingNames, this.props.displayName];
} else {
updatedEvent = {
@@ -93,30 +100,26 @@ class EventModal extends Component {
noResponse,
notAttending: [...notAttending, this.props.uid]
};
- firebase
- .database()
- .ref(`users/${this.props.uid}/notAttending/${this.props.event.groupID}/${event.eventID}`)
- .set(true)
- firebase
- .database()
- .ref(`users/${this.props.uid}/attending/${this.props.event.groupID}/${event.eventID}`)
- .remove()
- this.props.dispatch(fetchPersonalEvents(this.props.uid))
+ db.ref(
+ `users/${this.props.uid}/notAttending/${this.props.event.groupID}/${
+ event.eventID
+ }`
+ ).set(true);
+ db.ref(
+ `users/${this.props.uid}/attending/${this.props.event.groupID}/${
+ event.eventID
+ }`
+ ).remove();
+ this.props.dispatch(fetchPersonalEvents(this.props.uid));
notAttendingNames = [...notAttendingNames, this.props.displayName];
}
- // updates the group events
- this.props.dispatch(fetchAllEvents(this.props.uid))
- firebase
- .database()
- .ref(`events/${groupID}/${eventID}`)
- .set(updatedEvent);
+ // updates the group events
+ this.props.dispatch(fetchAllEvents(this.props.uid));
+ db.ref(`events/${groupID}/${eventID}`).set(updatedEvent);
// Updates event in message the event is attached to
const msgID = updatedEvent.msgID;
- firebase
- .database()
- .ref(`messages/${groupID}/${msgID}/event`)
- .set(updatedEvent);
+ db.ref(`messages/${groupID}/${msgID}/event`).set(updatedEvent);
// Updates Event Modal
this.props.dispatch(toggleEventModal(true, updatedEvent));
@@ -163,7 +166,7 @@ class EventModal extends Component {
);
};
- renderSameDate = date => { };
+ renderSameDate = date => {};
renderDate = date => {
return (
diff --git a/src/screens/Main/GroupScreen.js b/src/screens/Main/GroupScreen.js
index 5577f57..a664395 100644
--- a/src/screens/Main/GroupScreen.js
+++ b/src/screens/Main/GroupScreen.js
@@ -45,14 +45,13 @@ class GroupScreen extends Component {
};
};
-
componentDidMount() {
this.scrollToTop();
const db = firebase.database();
const uid = firebase.auth().currentUser.uid;
db.ref(`users/${uid}/groups`).on("value", () => {
- this.props.fetchGroups()
+ this.props.fetchGroups();
});
if (this.props.groups) {
@@ -68,7 +67,7 @@ class GroupScreen extends Component {
}
});
this.fetchGroup(groupId).then(() => {
- this.props.sortGroups()
+ this.props.sortGroups();
});
}
);
@@ -86,13 +85,18 @@ class GroupScreen extends Component {
};
renderLastMessage = groupId => {
- const groups = this.props.groups;
+ const group = this.props.groups[groupId];
- const isText = (groups[groupId].last_message || {}).messageType === "text";
- const username = (groups[groupId].last_message || {}).username;
+ const isText = (group.last_message || {}).messageType === "text";
+ let username;
+ if (group.last_message.sender === firebase.auth().currentUser.uid) {
+ username = "You";
+ } else {
+ username = (group.last_message || {}).username;
+ }
if (isText) {
- const message = (groups[groupId].last_message || {}).message;
+ const message = (group.last_message || {}).message;
return (
@@ -103,7 +107,7 @@ class GroupScreen extends Component {
);
} else {
- const eventTitle = (groups[groupId].last_message || {}).event.title;
+ const eventTitle = (group.last_message || {}).event.title;
return (
@@ -209,8 +213,8 @@ class GroupScreen extends Component {
}}
/>
) : (
- undefined
- )}
+ undefined
+ )}
diff --git a/src/screens/Main/Groups/CalendarScreen.js b/src/screens/Main/Groups/CalendarScreen.js
index d3701a2..6f72341 100644
--- a/src/screens/Main/Groups/CalendarScreen.js
+++ b/src/screens/Main/Groups/CalendarScreen.js
@@ -18,6 +18,7 @@ class CalendarScreen extends React.Component {
nav={dateString =>
this.props.navigation.navigate("CreateEvents", {
groupID: this.props.navigation.getParam("groupID"),
+ date: dateString
})
}
/>
diff --git a/src/screens/Main/Groups/ChatScreen.js b/src/screens/Main/Groups/ChatScreen.js
index 6101041..06acf48 100644
--- a/src/screens/Main/Groups/ChatScreen.js
+++ b/src/screens/Main/Groups/ChatScreen.js
@@ -12,7 +12,6 @@ import {
SafeAreaView,
StatusBar
} from "react-native";
-import { FlatList } from "react-native-gesture-handler";
import {
toggleEventModal,
populateAttending,
@@ -31,6 +30,7 @@ import EventBubble from "../../../components/EventBubble";
import MessageBubble from "../../../components/MessageBubble";
import theme from "../../../assets/theme";
import { fetchPersonalEvents } from "../../../store/actions/calendar";
+import { KeyboardAwareFlatList } from "react-native-keyboard-aware-scroll-view";
class ChatScreen extends Component {
constructor(props) {
@@ -40,7 +40,7 @@ class ChatScreen extends Component {
groupID: this.props.navigation.getParam("group").groupID,
textMessage: "",
dayOfLastMsg: new Date().getDay(),
- dateOfLastMsg: new Date().getDate(),
+ dateOfLastMsg: new Date().getDate()
};
this.convertTime = this.convertTime.bind(this);
this.sendMessage = this.sendMessage.bind(this);
@@ -111,7 +111,7 @@ class ChatScreen extends Component {
componentDidMount() {
this.props.navigation.setParams({
groupName: this.props.group.groupName
- })
+ });
}
componentWillMount() {
@@ -202,13 +202,21 @@ class ChatScreen extends Component {
};
firebase
.database()
- .ref(`users/${this.props.uid}/attending/${this.state.groupID}/${event.eventID}`)
- .set(true)
+ .ref(
+ `users/${this.props.uid}/attending/${this.state.groupID}/${
+ event.eventID
+ }`
+ )
+ .set(true);
firebase
.database()
- .ref(`users/${this.props.uid}/notAttending/${this.state.groupID}/${event.eventID}`)
- .remove()
- this.props.dispatch(fetchPersonalEvents(this.props.uid))
+ .ref(
+ `users/${this.props.uid}/notAttending/${this.state.groupID}/${
+ event.eventID
+ }`
+ )
+ .remove();
+ this.props.dispatch(fetchPersonalEvents(this.props.uid));
} else {
updatedEvent = {
...event,
@@ -218,13 +226,21 @@ class ChatScreen extends Component {
};
firebase
.database()
- .ref(`users/${this.props.uid}/notAttending/${this.state.groupID}/${event.eventID}`)
- .set(true)
+ .ref(
+ `users/${this.props.uid}/notAttending/${this.state.groupID}/${
+ event.eventID
+ }`
+ )
+ .set(true);
firebase
.database()
- .ref(`users/${this.props.uid}/attending/${this.state.groupID}/${event.eventID}`)
- .remove()
- this.props.dispatch(fetchPersonalEvents(this.props.uid))
+ .ref(
+ `users/${this.props.uid}/attending/${this.state.groupID}/${
+ event.eventID
+ }`
+ )
+ .remove();
+ this.props.dispatch(fetchPersonalEvents(this.props.uid));
}
firebase
.database()
@@ -310,24 +326,22 @@ class ChatScreen extends Component {
};
renderFooter = () => {
- return (
-
- )
- }
+ return ;
+ };
render() {
let height = Dimensions.get("window").height;
return (
-
-
+
);
}
}
@@ -406,7 +420,7 @@ const styles = StyleSheet.create({
color: "black",
bottom: 0,
fontSize: 16,
- backgroundColor: 'transparent'
+ backgroundColor: "transparent"
},
yourMessageBubble: {
justifyContent: "space-between",
diff --git a/src/screens/Main/Groups/CreateEvents.js b/src/screens/Main/Groups/CreateEvents.js
index 5ca7298..bdb29e2 100644
--- a/src/screens/Main/Groups/CreateEvents.js
+++ b/src/screens/Main/Groups/CreateEvents.js
@@ -258,7 +258,7 @@ class CreateEvents extends Component {
render() {
const width = Dimensions.get("window").width;
- console.log(this.props.fromDate)
+ console.log(this.props.fromDate);
return (
{
+const mapStateToProps = (state, ownProps) => {
const createEventsReducerState = state.createEventsReducer || {};
- console.log(createEventsReducerState.fromDate);
return {
title: createEventsReducerState.title,
fromDateVisibility: createEventsReducerState.fromDateVisibility,
toDateVisibility: createEventsReducerState.toDateVisibility,
- fromDate: createEventsReducerState.fromDate || new Date(),
- toDate: createEventsReducerState.toDate || createEventsReducerState.fromDate || new Date(),
+ fromDate: ownProps.navigation.getParam("date"),
+ toDate: ownProps.navigation.getParam("date"),
location: createEventsReducerState.location,
notes: createEventsReducerState.notes,
uid: state.authReducer.user.uid,
diff --git a/src/screens/Main/NotificationsScreen.js b/src/screens/Main/NotificationsScreen.js
index 7f953f1..873f341 100644
--- a/src/screens/Main/NotificationsScreen.js
+++ b/src/screens/Main/NotificationsScreen.js
@@ -1,5 +1,5 @@
import React from "react";
-import { View, Text, Image } from "react-native";
+import { View, Text } from "react-native";
import { createStackNavigator } from "react-navigation";
import HeaderTitle from "../../components/HeaderTitle";
import { cliqueBlue } from "../../assets/constants";
@@ -14,7 +14,7 @@ class NotificationsScreen extends React.Component {
render() {
return (
-
+
This is the notifications screen!
);
diff --git a/src/screens/Main/SettingsScreen.js b/src/screens/Main/SettingsScreen.js
index 42704d4..f627fea 100644
--- a/src/screens/Main/SettingsScreen.js
+++ b/src/screens/Main/SettingsScreen.js
@@ -5,8 +5,8 @@ import { cliqueBlue } from "../../assets/constants";
import firebase from "react-native-firebase";
import { connect } from "react-redux";
import { SIGN_OUT } from "../../store/constants";
-import defaultPicture from "../../assets/default_profile.png";
+import Spinner from "../../components/Spinner";
import Text from "../../components/Text";
import Button from "../../components/Button";
import GroupPicture from "../../components/GroupPicture";
@@ -19,10 +19,13 @@ class SettingsScreen extends React.Component {
}
};
+ state = { loading: false };
+
signOut = () => {
+ this.setState({ loading: true });
firebase.auth().signOut();
this.props.dispatch({ type: SIGN_OUT });
- this.props.navigation.navigate("Auth");
+ setTimeout(() => this.props.navigation.navigate("Auth"), 500);
};
renderProfilePic() {
@@ -56,6 +59,7 @@ class SettingsScreen extends React.Component {
Sign Out
+ {this.state.loading && }
);
}
diff --git a/src/store/actions/auth.js b/src/store/actions/auth.js
index b24722e..8f6506f 100644
--- a/src/store/actions/auth.js
+++ b/src/store/actions/auth.js
@@ -1,6 +1,5 @@
import firebase from "react-native-firebase";
import { USER_DETAILS } from "../constants";
-import { createGroup } from "./groups";
// action creator for authDetails for the phone authentication
// response from sign in after code is sent
@@ -11,42 +10,49 @@ export const setUserDetails = userDetails => {
};
};
-export const createAccount = (username, pictureUri, fileType) => dispatch => {
+export const createAccount = (username, pictureUri) => async dispatch => {
//upload picture to firebase storage
let user = firebase.auth().currentUser;
- firebase
- .storage()
- .ref(`images/profile_pictures/${new Date().getTime()}.jpeg`)
- .put(pictureUri)
- .then(snapshot => {
- if (snapshot.state === firebase.storage.TaskState.SUCCESS) {
- user
- .updateProfile({
+ return (
+ firebase
+ .storage()
+ .ref(`images/profile_pictures/${new Date().getTime()}.jpeg`)
+ .put(pictureUri)
+ .then(snapshot => {
+ if (snapshot.state === firebase.storage.TaskState.SUCCESS) {
+ return user.updateProfile({
displayName: username,
photoURL: snapshot.downloadURL
- })
- .then(() => {
- user = firebase.auth().currentUser;
- user["_user"]["groups"] = "";
- userDetailsToDatabase(user).then(() =>
- dispatch(setUserDetails(user))
- );
});
- }
- })
- .catch(err => {
- console.log(err.message);
- });
+ } else {
+ throw new Error("unable to update profile");
+ }
+ })
+ .then(() => {
+ user = firebase.auth().currentUser;
+ user["_user"]["groups"] = "";
+ return user;
+ })
+ // update user details in db
+ .then(user => {
+ userDetailsToDatabase(user);
+ return user;
+ })
+ // update user details locally (redux store)
+ .then(user => dispatch(setUserDetails(user)))
+ .catch(err => {
+ console.log(err.message);
+ })
+ );
};
-const userDetailsToDatabase = async user => {
+// send user details to the database to be stored during account creation
+const userDetailsToDatabase = user => {
const uid = user._user.uid;
- firebase
- .database()
- .ref(`users/${uid}`)
- .set(user);
- return firebase
- .database()
- .ref(`phoneNumbers/${user._user.phoneNumber}`)
- .set(user);
+ const db = firebase.database();
+ const promises = [
+ db.ref(`users/${uid}`).set(user),
+ db.ref(`phoneNumbers/${user._user.phoneNumber}`).set(user)
+ ];
+ return Promise.all(promises);
};
diff --git a/src/store/reducers/calendarReducer.js b/src/store/reducers/calendarReducer.js
index 3e375ee..ac7c971 100644
--- a/src/store/reducers/calendarReducer.js
+++ b/src/store/reducers/calendarReducer.js
@@ -1,4 +1,10 @@
-import { FETCH_EVENTS, CLEAR_EVENTS, STORE_PERSONAL_EVENTS, REMOVE_GROUP_EVENTS } from "../constants";
+import {
+ FETCH_EVENTS,
+ CLEAR_EVENTS,
+ STORE_PERSONAL_EVENTS,
+ REMOVE_GROUP_EVENTS,
+ SIGN_OUT
+} from "../constants";
import _ from "lodash";
const initialState = {
@@ -14,9 +20,11 @@ export const calendarReducer = (state = initialState, action) => {
} else if (action.type === CLEAR_EVENTS) {
return { ...state, events: {} };
} else if (action.type === STORE_PERSONAL_EVENTS) {
- return { ...state, personalEvents: action.payload }
+ return { ...state, personalEvents: action.payload };
} else if (action.type === REMOVE_GROUP_EVENTS) {
return _.omit(state, action.payload);
+ } else if (action.type === SIGN_OUT) {
+ return initialState;
}
return state;
};
diff --git a/src/store/reducers/groupsReducer.js b/src/store/reducers/groupsReducer.js
index 4f73264..4960732 100644
--- a/src/store/reducers/groupsReducer.js
+++ b/src/store/reducers/groupsReducer.js
@@ -5,7 +5,8 @@ import {
SORT_GROUPS,
REMOVE_GROUP,
ADD_MEMBER_TO_GROUP,
- REMOVE_USER_FROM_GROUP_REDUX
+ REMOVE_USER_FROM_GROUP_REDUX,
+ SIGN_OUT
} from "../constants";
import _ from "lodash";
@@ -15,6 +16,8 @@ const initialState = {
export const groupsReducer = (state = initialState, action) => {
switch (action.type) {
+ case SIGN_OUT:
+ return initialState;
case INITIALIZE_GROUPS:
return {
...state,
diff --git a/src/store/reducers/messagesReducer.js b/src/store/reducers/messagesReducer.js
index 366020d..821b0b6 100644
--- a/src/store/reducers/messagesReducer.js
+++ b/src/store/reducers/messagesReducer.js
@@ -1,7 +1,8 @@
import {
FETCH_CONVERSATION,
CHANGE_PREV_DATE,
- REMOVE_GROUP_MESSAGES
+ REMOVE_GROUP_MESSAGES,
+ SIGN_OUT
} from "../constants";
import _ from "lodash";
@@ -26,6 +27,8 @@ export const messagesReducer = (state = {}, action) => {
};
} else if (action.type === REMOVE_GROUP_MESSAGES) {
return _.omit(state, action.payload);
+ } else if (action.type === SIGN_OUT) {
+ return {};
} else {
return state;
}