diff --git a/android/app/src/main/assets/fonts/Feather.ttf b/android/app/src/main/assets/fonts/Feather.ttf old mode 100755 new mode 100644 index fc963df..852c713 Binary files a/android/app/src/main/assets/fonts/Feather.ttf and b/android/app/src/main/assets/fonts/Feather.ttf differ diff --git a/android/app/src/main/assets/fonts/Fontisto.ttf b/android/app/src/main/assets/fonts/Fontisto.ttf new file mode 100755 index 0000000..96e2e81 Binary files /dev/null and b/android/app/src/main/assets/fonts/Fontisto.ttf differ diff --git a/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf b/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf index 3219fca..9cc8db1 100644 Binary files a/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf and b/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf differ diff --git a/ios/Podfile b/ios/Podfile index a0fadaf..badc0f8 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -33,12 +33,6 @@ target 'RNFirebaseStarter' do pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer' - pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage' - - pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo' - - pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image' - end target 'RNFirebaseStarter-tvOS' do diff --git a/ios/RNFirebaseStarter.xcodeproj/project.pbxproj b/ios/RNFirebaseStarter.xcodeproj/project.pbxproj index 839a7b3..639a38e 100644 --- a/ios/RNFirebaseStarter.xcodeproj/project.pbxproj +++ b/ios/RNFirebaseStarter.xcodeproj/project.pbxproj @@ -5,6 +5,7 @@ }; 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 */; }; @@ -41,17 +42,15 @@ 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 324DD069357C482B9776B571 /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D3F79AEC805D430DB3440820 /* AntDesign.ttf */; }; 349EC16E9E4A4527868D5921 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5A6D0699053047968A3F10B8 /* MaterialIcons.ttf */; }; - 5617277422A4DD6400D3B23C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5617277322A4DD6400D3B23C /* GoogleService-Info.plist */; }; 561727C122A4FAC200D3B23C /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 561727C022A4FAA700D3B23C /* libRNImagePicker.a */; }; - 5629CB4122C202D8002D1FC3 /* libFastImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5629CB1222C202D2002D1FC3 /* libFastImage.a */; }; 56E6F87B22A664DD00D4C120 /* libRNGestureHandler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56E6F87822A664CC00D4C120 /* libRNGestureHandler.a */; }; - 56FA686622C201CA002D06E5 /* libRNCNetInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56FA685E22C201BC002D06E5 /* libRNCNetInfo.a */; }; 5B82985763AD4149A217586A /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B20BB4576BA74713A9A2FE0F /* Octicons.ttf */; }; 66F583A38C047519D1E18159 /* libPods-RNFirebaseStarter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 599A1087F9C545123EFD61BE /* libPods-RNFirebaseStarter.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 893723EFD2C64F249E0B6E66 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 88C01827F7F14D2183C4F39A /* MaterialCommunityIcons.ttf */; }; 8AEB10120B9847F8905B7DA1 /* libRNFirebase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C97DD56AE46E45398AF70E2E /* libRNFirebase.a */; }; 90539CD4236B414187F5394E /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3A0F448DD8E7467E8BB59251 /* EvilIcons.ttf */; }; + 9F33F98622CF3C1400D30CA2 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9F33F98522CF3C1400D30CA2 /* GoogleService-Info.plist */; }; 9F83685A22A8E19500A6B336 /* libRNFetchBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F83685922A8E10100A6B336 /* libRNFetchBlob.a */; }; 9F83685B22A8E6F200A6B336 /* libRCTContacts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F83682D22A8DA6700A6B336 /* libRCTContacts.a */; }; 9F83692122A95EC100A6B336 /* libRNCAsyncStorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F83692022A95EC100A6B336 /* libRNCAsyncStorage.a */; }; @@ -64,6 +63,7 @@ AE31F7AF047644BC84A920E3 /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FEC1A57D75E342EE87C614EF /* FontAwesome5_Solid.ttf */; }; B8713BCE19214F4087441659 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DD6532BBBA4F49D0852ABB8B /* FontAwesome5_Regular.ttf */; }; BF2BC69361914891B09D6A76 /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 992719BE5F394B5D94F4D38E /* Feather.ttf */; }; + C351E8766EA54D788711ABA6 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 45E5357A5B4F4174B34EA41E /* Fontisto.ttf */; }; C8A36180449348B6879AD8D6 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A6BA80C87A3D44D3A10FBE99 /* Ionicons.ttf */; }; DE9191262653403386FBF6DB /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0ED1C7039F684FC19AACD387 /* FontAwesome5_Brands.ttf */; }; E58DF5A6488C4B5D9DABAB5E /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CA951F015614479B9E77B0DA /* FontAwesome.ttf */; }; @@ -325,13 +325,6 @@ remoteGlobalIDString = 014A3B5C1C6CF33500B6D375; remoteInfo = RNImagePicker; }; - 5629CB1122C202D2002D1FC3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5629CB0C22C202D2002D1FC3 /* FastImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A287971D1DE0C0A60081BDFA; - remoteInfo = FastImage; - }; 56E6F87722A664CC00D4C120 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 56E6F87222A664CC00D4C120 /* RNGestureHandler.xcodeproj */; @@ -346,20 +339,6 @@ remoteGlobalIDString = B5C32A36220C603B000FFB8D; remoteInfo = "RNGestureHandler-tvOS"; }; - 56FA685D22C201BC002D06E5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 56FA683122C201BC002D06E5 /* RNCNetInfo.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RNCNetInfo; - }; - 56FA685F22C201BC002D06E5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 56FA683122C201BC002D06E5 /* RNCNetInfo.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = B5027B1B2237B30F00F1AABA; - remoteInfo = "RNCNetInfo-tvOS"; - }; 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; @@ -388,6 +367,13 @@ remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; + 9F33F95422CF3C0600D30CA2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FE2674A22C202C90014FBB7 /* FastImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = FD751C4D229EB44C002BE1F4; + remoteInfo = "FastImage-tvOS"; + }; 9F83682C22A8DA6700A6B336 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9F83682322A8DA6700A6B336 /* RCTContacts.xcodeproj */; @@ -466,12 +452,10 @@ 2D02E4901E0B4A5D006451C7 /* RNFirebaseStarter-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "RNFirebaseStarter-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 3A0F448DD8E7467E8BB59251 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; }; + 45E5357A5B4F4174B34EA41E /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = ""; }; 4A114661868ACFA83CCA60B3 /* libPods-RNFirebaseStarter-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNFirebaseStarter-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5617277322A4DD6400D3B23C /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../Downloads/GoogleService-Info.plist"; sourceTree = ""; }; 561727BB22A4FAA700D3B23C /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = ""; }; - 5629CB0C22C202D2002D1FC3 /* FastImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FastImage.xcodeproj; path = "../node_modules/react-native-fast-image/ios/FastImage.xcodeproj"; sourceTree = ""; }; 56E6F87222A664CC00D4C120 /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = ""; }; - 56FA683122C201BC002D06E5 /* RNCNetInfo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNCNetInfo.xcodeproj; path = "../node_modules/@react-native-community/netinfo/ios/RNCNetInfo.xcodeproj"; sourceTree = ""; }; 599A1087F9C545123EFD61BE /* libPods-RNFirebaseStarter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNFirebaseStarter.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 5A6D0699053047968A3F10B8 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = ""; }; 5A8535DF585F40E98C1F70FE /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = ""; }; @@ -485,6 +469,7 @@ 8C34C759D8274A5CB8F8E751 /* RNFirebase.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFirebase.xcodeproj; path = "../node_modules/react-native-firebase/ios/RNFirebase.xcodeproj"; sourceTree = ""; }; 8E71EB77D855442CAB9AC589 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = ""; }; 992719BE5F394B5D94F4D38E /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = ""; }; + 9F33F98522CF3C1400D30CA2 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 9F83682322A8DA6700A6B336 /* RCTContacts.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTContacts.xcodeproj; path = "../node_modules/react-native-contacts/ios/RCTContacts.xcodeproj"; sourceTree = ""; }; 9F83685422A8E10100A6B336 /* RNFetchBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNFetchBlob.xcodeproj; path = "../node_modules/rn-fetch-blob/ios/RNFetchBlob.xcodeproj"; sourceTree = ""; }; 9F83692022A95EC100A6B336 /* libRNCAsyncStorage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libRNCAsyncStorage.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -744,14 +729,6 @@ name = Products; sourceTree = ""; }; - 5629CB0D22C202D2002D1FC3 /* Products */ = { - isa = PBXGroup; - children = ( - 5629CB1222C202D2002D1FC3 /* libFastImage.a */, - ); - name = Products; - sourceTree = ""; - }; 56E6F87322A664CC00D4C120 /* Products */ = { isa = PBXGroup; children = ( @@ -761,15 +738,6 @@ name = Products; sourceTree = ""; }; - 56FA683222C201BC002D06E5 /* Products */ = { - isa = PBXGroup; - children = ( - 56FA685E22C201BC002D06E5 /* libRNCNetInfo.a */, - 56FA686022C201BC002D06E5 /* libRNCNetInfo-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; 5E91572E1DD0AC6500FF2AA8 /* Products */ = { isa = PBXGroup; children = ( @@ -827,7 +795,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( - 5617277322A4DD6400D3B23C /* GoogleService-Info.plist */, + 9F33F98522CF3C1400D30CA2 /* GoogleService-Info.plist */, 13B07FAE1A68108700A75B9A /* RNFirebaseStarter */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* RNFirebaseStarterTests */, @@ -890,6 +858,7 @@ isa = PBXGroup; children = ( 9FE2675022C202CA0014FBB7 /* libFastImage.a */, + 9F33F95522CF3C0600D30CA2 /* libFastImage-tvOS.a */, ); name = Products; sourceTree = ""; @@ -921,6 +890,7 @@ B20BB4576BA74713A9A2FE0F /* Octicons.ttf */, 5A8535DF585F40E98C1F70FE /* SimpleLineIcons.ttf */, 8E71EB77D855442CAB9AC589 /* Zocial.ttf */, + 45E5357A5B4F4174B34EA41E /* Fontisto.ttf */, ); name = Resources; sourceTree = ""; @@ -1376,13 +1346,6 @@ remoteRef = 561727BF22A4FAA700D3B23C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 5629CB1222C202D2002D1FC3 /* libFastImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libFastImage.a; - remoteRef = 5629CB1122C202D2002D1FC3 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 56E6F87822A664CC00D4C120 /* libRNGestureHandler.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1397,20 +1360,6 @@ remoteRef = 56E6F87922A664CC00D4C120 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 56FA685E22C201BC002D06E5 /* libRNCNetInfo.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRNCNetInfo.a; - remoteRef = 56FA685D22C201BC002D06E5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 56FA686022C201BC002D06E5 /* libRNCNetInfo-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRNCNetInfo-tvOS.a"; - remoteRef = 56FA685F22C201BC002D06E5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1439,6 +1388,13 @@ remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 9F33F95522CF3C0600D30CA2 /* libFastImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libFastImage-tvOS.a"; + remoteRef = 9F33F95422CF3C0600D30CA2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 9F83682D22A8DA6700A6B336 /* libRCTContacts.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1513,14 +1469,15 @@ DE9191262653403386FBF6DB /* FontAwesome5_Brands.ttf in Resources */, B8713BCE19214F4087441659 /* FontAwesome5_Regular.ttf in Resources */, AE31F7AF047644BC84A920E3 /* FontAwesome5_Solid.ttf in Resources */, - 5617277422A4DD6400D3B23C /* GoogleService-Info.plist in Resources */, EA0ED25413724323A0DF5B1D /* Foundation.ttf in Resources */, C8A36180449348B6879AD8D6 /* Ionicons.ttf in Resources */, 893723EFD2C64F249E0B6E66 /* MaterialCommunityIcons.ttf in Resources */, 349EC16E9E4A4527868D5921 /* MaterialIcons.ttf in Resources */, 5B82985763AD4149A217586A /* Octicons.ttf in Resources */, A206E1835EEB410C8D22F9C3 /* SimpleLineIcons.ttf in Resources */, + 9F33F98622CF3C1400D30CA2 /* GoogleService-Info.plist in Resources */, 179E4EF295604ED2A0E03B6B /* Zocial.ttf in Resources */, + C351E8766EA54D788711ABA6 /* Fontisto.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/RNFirebaseStarter/Info.plist b/ios/RNFirebaseStarter/Info.plist index 23b615d..9d9b110 100644 --- a/ios/RNFirebaseStarter/Info.plist +++ b/ios/RNFirebaseStarter/Info.plist @@ -77,6 +77,7 @@ Octicons.ttf SimpleLineIcons.ttf Zocial.ttf + Fontisto.ttf UILaunchStoryboardName LaunchScreen diff --git a/package-lock.json b/package-lock.json index 7bbd9f5..3d85b47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4680,8 +4680,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -4699,13 +4698,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4718,18 +4715,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -4832,8 +4826,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -4843,7 +4836,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4856,20 +4848,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4886,7 +4875,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4959,8 +4947,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -4970,7 +4957,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5046,8 +5032,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -5077,7 +5062,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5095,7 +5079,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5134,13 +5117,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } }, diff --git a/src/components/SystemMessageBubble.js b/src/components/SystemMessageBubble.js new file mode 100644 index 0000000..94e210e --- /dev/null +++ b/src/components/SystemMessageBubble.js @@ -0,0 +1,15 @@ +import React, { Component } from "react"; +import { View } from "react-native"; +import Text from "./Text"; + +export default class SystemMessageBubble extends Component { + render() { + return ( + + + {this.props.message} + + + ) + } +} \ No newline at end of file diff --git a/src/screens/Main/Groups/ChatScreen.js b/src/screens/Main/Groups/ChatScreen.js index 06acf48..015c724 100644 --- a/src/screens/Main/Groups/ChatScreen.js +++ b/src/screens/Main/Groups/ChatScreen.js @@ -31,6 +31,9 @@ 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"; +import SystemMessageBubble from "../../../components/SystemMessageBubble"; +import { getDate } from "../../../assets/constants" +import { FlatList } from "react-native-gesture-handler" class ChatScreen extends Component { constructor(props) { @@ -156,6 +159,24 @@ class ChatScreen extends Component { sendMessage = () => { const groupID = this.state.groupID; if (this.state.textMessage.length > 0) { + const lastMessage = this.props.group.last_message; + const dateObj = (new Date(lastMessage.timestamp)); + const currentDate = new Date(); + const diffDate = dateObj.getDate() !== currentDate.getDate() || dateObj.getMonth() !== currentDate.getMonth(); + + if (diffDate || lastMessage.sender === "") { + const dateMsgID = this.messagesRef.child(`${groupID}`).push().key; + const dateMessage = { + messageType: "system", + message: `${getDate(currentDate)}`, + timestamp: firebase.database.ServerValue.TIMESTAMP, + sender: "", + } + this.messagesRef + .child(`${groupID}`) + .child(`${dateMsgID}`) + .set(dateMessage); + } const msgID = this.messagesRef.child(`${groupID}`).push().key; let message = { messageType: "text", @@ -204,7 +225,7 @@ class ChatScreen extends Component { .database() .ref( `users/${this.props.uid}/attending/${this.state.groupID}/${ - event.eventID + event.eventID }` ) .set(true); @@ -212,7 +233,7 @@ class ChatScreen extends Component { .database() .ref( `users/${this.props.uid}/notAttending/${this.state.groupID}/${ - event.eventID + event.eventID }` ) .remove(); @@ -228,7 +249,7 @@ class ChatScreen extends Component { .database() .ref( `users/${this.props.uid}/notAttending/${this.state.groupID}/${ - event.eventID + event.eventID }` ) .set(true); @@ -236,7 +257,7 @@ class ChatScreen extends Component { .database() .ref( `users/${this.props.uid}/attending/${this.state.groupID}/${ - event.eventID + event.eventID }` ) .remove(); @@ -321,7 +342,13 @@ class ChatScreen extends Component { item={item} convertDate={convertDate} /> - ); + ) + } else if (item.messageType === "system") { + return ( + + ) } }; @@ -341,19 +368,33 @@ class ChatScreen extends Component { - index.toString()} - ListFooterComponent={this.renderFooter} - /> + {Platform.OS === "ios" + ? ( index.toString()} + ListFooterComponent={this.renderFooter} + />) + : ( index.toString()} + ListFooterComponent={this.renderFooter} + />)}