├── .buckconfig ├── .bundle └── config ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── .ruby-version ├── .swm ├── dummy-documentation.8w0ga.sw.md └── swimm.json ├── .wakatime-project ├── .watchmanconfig ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── __tests__ └── App-test.tsx ├── android ├── app │ ├── _BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── reactnativenestedcomments │ │ │ └── ReactNativeFlipper.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── reactnativenestedcomments │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── drawable │ │ └── rn_edit_text_material.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios ├── Podfile ├── Podfile.lock ├── reactNativeNestedComments.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── reactNativeNestedComments.xcscheme ├── reactNativeNestedComments.xcworkspace │ └── contents.xcworkspacedata ├── reactNativeNestedComments │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m └── reactNativeNestedCommentsTests │ ├── Info.plist │ └── reactNativeNestedCommentsTests.m ├── metro.config.js ├── package.json ├── patches └── reanimated-collapsible-helpers+1.0.0.patch ├── src ├── App.tsx ├── comments.ts ├── components │ ├── ArrowIcon.tsx │ ├── CollapsibleView.tsx │ ├── Comment.tsx │ └── styledComponents.tsx └── utils.ts ├── tsconfig.json └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint'], 6 | overrides: [ 7 | { 8 | files: ['*.ts', '*.tsx'], 9 | rules: { 10 | '@typescript-eslint/no-shadow': ['error'], 11 | 'no-shadow': 'off', 12 | 'no-undef': 'off', 13 | }, 14 | }, 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | *.hprof 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | !debug.keystore 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://docs.fastlane.tools/best-practices/source-control/ 51 | 52 | */fastlane/report.xml 53 | */fastlane/Preview.html 54 | */fastlane/screenshots 55 | 56 | # Bundle artifact 57 | *.jsbundle 58 | 59 | # CocoaPods 60 | /ios/Pods/ 61 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'none', 6 | arrowParens: 'avoid' 7 | }; 8 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.4 -------------------------------------------------------------------------------- /.swm/dummy-documentation.8w0ga.sw.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: 8w0ga 3 | title: Dummy Documentation 4 | file_version: 1.1.1 5 | app_version: 1.0.17 6 | --- 7 | 8 | This is a test doc generation using swimm 9 | 10 | # Testing the headers 11 | 12 |
13 | 14 |
15 | 16 | This is a comment component, you pass `isParent` prop so we know the indentation of the lines. 17 | 18 | ### 📄 src/App.tsx 19 | ```tsx 20 | 25 0} 23 | 28 index={index} 24 | 29 isParent 25 | 30 lastCommentParentId={getLastChildCommentIdFromParent(item)} 26 | 31 lastCommentGrandId={getLastChildCommentId(item)} 27 | 32 nested={0} 28 | 33 isParentLast={false} 29 | 34 // @ts-ignore 30 | 35 isLast={item.id === comments[comments?.length - 1].id} 31 | 36 parentCommentLength={0} 32 | 37 totalChildren={item?.child_comments?.length || 0} 33 | 38 /> 34 | 39 ) : null} 35 | ``` 36 | 37 |
38 | 39 |
40 | 41 |
42 | 43 | This file was generated by Swimm. [Click here to view it in the app](https://app.swimm.io/repos/Z2l0aHViJTNBJTNBcmVhY3QtbmF0aXZlLW5lc3RlZC1jb21tZW50cy13aXRoLWxpbmVzJTNBJTNBZWZzdGF0aGlvc250b25hcw==/docs/8w0ga). 44 | -------------------------------------------------------------------------------- /.swm/swimm.json: -------------------------------------------------------------------------------- 1 | { 2 | "repo_id": "Z2l0aHViJTNBJTNBcmVhY3QtbmF0aXZlLW5lc3RlZC1jb21tZW50cy13aXRoLWxpbmVzJTNBJTNBZWZzdGF0aGlvc250b25hcw==", 3 | "configuration": { 4 | "swmd": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.wakatime-project: -------------------------------------------------------------------------------- 1 | Silent Bonus 16 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 3 | ruby '2.7.4' 4 | gem 'cocoapods', '~> 1.11', '>= 1.11.2' 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.5) 5 | rexml 6 | activesupport (6.1.5) 7 | concurrent-ruby (~> 1.0, >= 1.0.2) 8 | i18n (>= 1.6, < 2) 9 | minitest (>= 5.1) 10 | tzinfo (~> 2.0) 11 | zeitwerk (~> 2.3) 12 | addressable (2.8.0) 13 | public_suffix (>= 2.0.2, < 5.0) 14 | algoliasearch (1.27.5) 15 | httpclient (~> 2.8, >= 2.8.3) 16 | json (>= 1.5.1) 17 | atomos (0.1.3) 18 | claide (1.1.0) 19 | cocoapods (1.11.3) 20 | addressable (~> 2.8) 21 | claide (>= 1.0.2, < 2.0) 22 | cocoapods-core (= 1.11.3) 23 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 24 | cocoapods-downloader (>= 1.4.0, < 2.0) 25 | cocoapods-plugins (>= 1.0.0, < 2.0) 26 | cocoapods-search (>= 1.0.0, < 2.0) 27 | cocoapods-trunk (>= 1.4.0, < 2.0) 28 | cocoapods-try (>= 1.1.0, < 2.0) 29 | colored2 (~> 3.1) 30 | escape (~> 0.0.4) 31 | fourflusher (>= 2.3.0, < 3.0) 32 | gh_inspector (~> 1.0) 33 | molinillo (~> 0.8.0) 34 | nap (~> 1.0) 35 | ruby-macho (>= 1.0, < 3.0) 36 | xcodeproj (>= 1.21.0, < 2.0) 37 | cocoapods-core (1.11.3) 38 | activesupport (>= 5.0, < 7) 39 | addressable (~> 2.8) 40 | algoliasearch (~> 1.0) 41 | concurrent-ruby (~> 1.1) 42 | fuzzy_match (~> 2.0.4) 43 | nap (~> 1.0) 44 | netrc (~> 0.11) 45 | public_suffix (~> 4.0) 46 | typhoeus (~> 1.0) 47 | cocoapods-deintegrate (1.0.5) 48 | cocoapods-downloader (1.5.1) 49 | cocoapods-plugins (1.0.0) 50 | nap 51 | cocoapods-search (1.0.1) 52 | cocoapods-trunk (1.6.0) 53 | nap (>= 0.8, < 2.0) 54 | netrc (~> 0.11) 55 | cocoapods-try (1.2.0) 56 | colored2 (3.1.2) 57 | concurrent-ruby (1.1.9) 58 | escape (0.0.4) 59 | ethon (0.15.0) 60 | ffi (>= 1.15.0) 61 | ffi (1.15.5) 62 | fourflusher (2.3.1) 63 | fuzzy_match (2.0.4) 64 | gh_inspector (1.1.3) 65 | httpclient (2.8.3) 66 | i18n (1.10.0) 67 | concurrent-ruby (~> 1.0) 68 | json (2.6.1) 69 | minitest (5.15.0) 70 | molinillo (0.8.0) 71 | nanaimo (0.3.0) 72 | nap (1.1.0) 73 | netrc (0.11.0) 74 | public_suffix (4.0.6) 75 | rexml (3.2.5) 76 | ruby-macho (2.5.1) 77 | typhoeus (1.4.0) 78 | ethon (>= 0.9.0) 79 | tzinfo (2.0.4) 80 | concurrent-ruby (~> 1.0) 81 | xcodeproj (1.21.0) 82 | CFPropertyList (>= 2.3.3, < 4.0) 83 | atomos (~> 0.1.3) 84 | claide (>= 1.0.2, < 2.0) 85 | colored2 (~> 3.1) 86 | nanaimo (~> 0.3.0) 87 | rexml (~> 3.2.4) 88 | zeitwerk (2.5.4) 89 | PLATFORMS 90 | ruby 91 | DEPENDENCIES 92 | cocoapods (~> 1.11, >= 1.11.2) 93 | RUBY VERSION 94 | ruby 2.7.4p191 95 | BUNDLED WITH 96 | 2.2.27 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Efstathios Ntonas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## React Native Nested Comments With Line Indicators 2 | 3 | ### Uses reanimated 2 to collapse comments via [`reanimated-collapsible-helpers`](https://github.com/Trancever/reanimated-collapsible-helpers), [`react-native-svg`](https://github.com/react-native-svg/react-native-svg) for the line drawing and FlatList. 4 | 5 | --- 6 | #### Notice 1: 7 | Code and typings are rough and maybe ugly, for sure it can be improved. It's just an MVP to get it working. If you have suggestions or improvements feel free to Pull Request. 8 | 9 | #### Notice 2: 10 | 11 | `CollapsibleView` was inspired by [Eliav2/react-native-collapsible-view](https://github.com/Eliav2/react-native-collapsible-view) 12 | 13 | #### Notice 3: 14 | 15 | `reanimated-collabsiple-headers` is patched to support some extra props, changes are in patches folder 16 | 17 | --- 18 | Supports 2 level of nesting like major social apps. 19 | 20 | #### Battle tested with hundreds of comments with 0 lag. 21 | 22 | 23 | The struggle to built it was real... 24 | 25 | Demo: 26 | 27 | https://user-images.githubusercontent.com/717975/160124970-0d256d37-5f8f-40b0-a89d-8e78394354de.mov 28 | 29 | -------------------------------------------------------------------------------- /__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../src/App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.reactnativenestedcomments", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.reactnativenestedcomments", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation. If none specified and 19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 20 | * // default. Can be overridden with ENTRY_FILE environment variable. 21 | * entryFile: "index.android.js", 22 | * 23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 24 | * bundleCommand: "ram-bundle", 25 | * 26 | * // whether to bundle JS and assets in debug mode 27 | * bundleInDebug: false, 28 | * 29 | * // whether to bundle JS and assets in release mode 30 | * bundleInRelease: true, 31 | * 32 | * // whether to bundle JS and assets in another build variant (if configured). 33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 34 | * // The configuration property can be in the following formats 35 | * // 'bundleIn${productFlavor}${buildType}' 36 | * // 'bundleIn${buildType}' 37 | * // bundleInFreeDebug: true, 38 | * // bundleInPaidRelease: true, 39 | * // bundleInBeta: true, 40 | * 41 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 42 | * // for example: to disable dev mode in the staging build type (if configured) 43 | * devDisabledInStaging: true, 44 | * // The configuration property can be in the following formats 45 | * // 'devDisabledIn${productFlavor}${buildType}' 46 | * // 'devDisabledIn${buildType}' 47 | * 48 | * // the root of your project, i.e. where "package.json" lives 49 | * root: "../../", 50 | * 51 | * // where to put the JS bundle asset in debug mode 52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 53 | * 54 | * // where to put the JS bundle asset in release mode 55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 56 | * 57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 58 | * // require('./image.png')), in debug mode 59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 60 | * 61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 62 | * // require('./image.png')), in release mode 63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 64 | * 65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 69 | * // for example, you might want to remove it from here. 70 | * inputExcludes: ["android/**", "ios/**"], 71 | * 72 | * // override which node gets called and with what additional arguments 73 | * nodeExecutableAndArgs: ["node"], 74 | * 75 | * // supply additional arguments to the packager 76 | * extraPackagerArgs: [] 77 | * ] 78 | */ 79 | 80 | project.ext.react = [ 81 | enableHermes: false, // clean and rebuild if changing 82 | ] 83 | 84 | apply from: "../../node_modules/react-native/react.gradle" 85 | 86 | /** 87 | * Set this to true to create two separate APKs instead of one: 88 | * - An APK that only works on ARM devices 89 | * - An APK that only works on x86 devices 90 | * The advantage is the size of the APK is reduced by about 4MB. 91 | * Upload all the APKs to the Play Store and people will download 92 | * the correct one based on the CPU architecture of their device. 93 | */ 94 | def enableSeparateBuildPerCPUArchitecture = false 95 | 96 | /** 97 | * Run Proguard to shrink the Java bytecode in release builds. 98 | */ 99 | def enableProguardInReleaseBuilds = false 100 | 101 | /** 102 | * The preferred build flavor of JavaScriptCore. 103 | * 104 | * For example, to use the international variant, you can use: 105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 106 | * 107 | * The international variant includes ICU i18n library and necessary data 108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 109 | * give correct results when using with locales other than en-US. Note that 110 | * this variant is about 6MiB larger per architecture than default. 111 | */ 112 | def jscFlavor = 'org.webkit:android-jsc:+' 113 | 114 | /** 115 | * Whether to enable the Hermes VM. 116 | * 117 | * This should be set on project.ext.react and that value will be read here. If it is not set 118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 119 | * and the benefits of using Hermes will therefore be sharply reduced. 120 | */ 121 | def enableHermes = project.ext.react.get("enableHermes", false); 122 | 123 | /** 124 | * Architectures to build native code for in debug. 125 | */ 126 | def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") 127 | 128 | android { 129 | ndkVersion rootProject.ext.ndkVersion 130 | 131 | compileSdkVersion rootProject.ext.compileSdkVersion 132 | 133 | defaultConfig { 134 | applicationId "com.reactnativenestedcomments" 135 | minSdkVersion rootProject.ext.minSdkVersion 136 | targetSdkVersion rootProject.ext.targetSdkVersion 137 | versionCode 1 138 | versionName "1.0" 139 | } 140 | splits { 141 | abi { 142 | reset() 143 | enable enableSeparateBuildPerCPUArchitecture 144 | universalApk false // If true, also generate a universal APK 145 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 146 | } 147 | } 148 | signingConfigs { 149 | debug { 150 | storeFile file('debug.keystore') 151 | storePassword 'android' 152 | keyAlias 'androiddebugkey' 153 | keyPassword 'android' 154 | } 155 | } 156 | buildTypes { 157 | debug { 158 | signingConfig signingConfigs.debug 159 | if (nativeArchitectures) { 160 | ndk { 161 | abiFilters nativeArchitectures.split(',') 162 | } 163 | } 164 | } 165 | release { 166 | // Caution! In production, you need to generate your own keystore file. 167 | // see https://reactnative.dev/docs/signed-apk-android. 168 | signingConfig signingConfigs.debug 169 | minifyEnabled enableProguardInReleaseBuilds 170 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 171 | } 172 | } 173 | 174 | // applicationVariants are e.g. debug, release 175 | applicationVariants.all { variant -> 176 | variant.outputs.each { output -> 177 | // For each separate APK per architecture, set a unique version code as described here: 178 | // https://developer.android.com/studio/build/configure-apk-splits.html 179 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 180 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 181 | def abi = output.getFilter(OutputFile.ABI) 182 | if (abi != null) { // null for the universal-debug, universal-release variants 183 | output.versionCodeOverride = 184 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 185 | } 186 | 187 | } 188 | } 189 | } 190 | 191 | dependencies { 192 | implementation fileTree(dir: "libs", include: ["*.jar"]) 193 | //noinspection GradleDynamicVersion 194 | implementation "com.facebook.react:react-native:+" // From node_modules 195 | 196 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 197 | 198 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 199 | exclude group:'com.facebook.fbjni' 200 | } 201 | 202 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 203 | exclude group:'com.facebook.flipper' 204 | exclude group:'com.squareup.okhttp3', module:'okhttp' 205 | } 206 | 207 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 208 | exclude group:'com.facebook.flipper' 209 | } 210 | 211 | if (enableHermes) { 212 | def hermesPath = "../../node_modules/hermes-engine/android/"; 213 | debugImplementation files(hermesPath + "hermes-debug.aar") 214 | releaseImplementation files(hermesPath + "hermes-release.aar") 215 | } else { 216 | implementation jscFlavor 217 | } 218 | } 219 | 220 | // Run this once to be able to run the application with BUCK 221 | // puts all compile dependencies into folder libs for BUCK to use 222 | task copyDownloadableDepsToLibs(type: Copy) { 223 | from configurations.implementation 224 | into 'libs' 225 | } 226 | 227 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 228 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/reactnativenestedcomments/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.reactnativenestedcomments; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativenestedcomments/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativenestedcomments; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "reactNativeNestedComments"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativenestedcomments/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactnativenestedcomments; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | import com.facebook.react.bridge.JSIModulePackage; 14 | import com.swmansion.reanimated.ReanimatedJSIModulePackage; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = 19 | new ReactNativeHost(this) { 20 | @Override 21 | public boolean getUseDeveloperSupport() { 22 | return BuildConfig.DEBUG; 23 | } 24 | 25 | @Override 26 | protected List getPackages() { 27 | @SuppressWarnings("UnnecessaryLocalVariable") 28 | List packages = new PackageList(this).getPackages(); 29 | // Packages that cannot be autolinked yet can be added manually here, for example: 30 | // packages.add(new MyReactNativePackage()); 31 | return packages; 32 | } 33 | 34 | @Override 35 | protected String getJSMainModuleName() { 36 | return "index"; 37 | } 38 | 39 | @Override 40 | protected JSIModulePackage getJSIModulePackage() { 41 | return new ReanimatedJSIModulePackage(); 42 | } 43 | }; 44 | 45 | @Override 46 | public ReactNativeHost getReactNativeHost() { 47 | return mReactNativeHost; 48 | } 49 | 50 | @Override 51 | public void onCreate() { 52 | super.onCreate(); 53 | SoLoader.init(this, /* native exopackage */ false); 54 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 55 | } 56 | 57 | /** 58 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 59 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 60 | * 61 | * @param context 62 | * @param reactInstanceManager 63 | */ 64 | private static void initializeFlipper( 65 | Context context, ReactInstanceManager reactInstanceManager) { 66 | if (BuildConfig.DEBUG) { 67 | try { 68 | /* 69 | We use reflection here to pick up the class that initializes Flipper, 70 | since Flipper library is not available in release mode 71 | */ 72 | Class aClass = Class.forName("com.reactnativenestedcomments.ReactNativeFlipper"); 73 | aClass 74 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 75 | .invoke(null, context, reactInstanceManager); 76 | } catch (ClassNotFoundException e) { 77 | e.printStackTrace(); 78 | } catch (NoSuchMethodException e) { 79 | e.printStackTrace(); 80 | } catch (IllegalAccessException e) { 81 | e.printStackTrace(); 82 | } catch (InvocationTargetException e) { 83 | e.printStackTrace(); 84 | } 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 18 | 19 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | reactNativeNestedComments 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "30.0.2" 6 | minSdkVersion = 21 7 | compileSdkVersion = 30 8 | targetSdkVersion = 30 9 | ndkVersion = "21.4.7075529" 10 | } 11 | repositories { 12 | google() 13 | mavenCentral() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:4.2.2") 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | maven { 25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 26 | url("$rootDir/../node_modules/react-native/android") 27 | } 28 | maven { 29 | // Android JSC is installed from npm 30 | url("$rootDir/../node_modules/jsc-android/dist") 31 | } 32 | mavenCentral { 33 | // We don't want to fetch react-native from Maven Central as there are 34 | // older versions over there. 35 | content { 36 | excludeGroup "com.facebook.react" 37 | } 38 | } 39 | google() 40 | maven { url 'https://www.jitpack.io' } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.99.0 29 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efstathiosntonas/react-native-nested-comments-with-lines/79beb168ef93c544baaf0544412d101349f88df0/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'reactNativeNestedComments' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reactNativeNestedComments", 3 | "displayName": "reactNativeNestedComments" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | plugins: ['react-native-reanimated/plugin'] 4 | }; 5 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './src/App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '11.0' 5 | 6 | target 'reactNativeNestedComments' do 7 | config = use_native_modules! 8 | 9 | use_react_native!( 10 | :path => config[:reactNativePath], 11 | # to enable hermes on iOS, change `false` to `true` and then install pods 12 | :hermes_enabled => false 13 | ) 14 | 15 | target 'reactNativeNestedCommentsTests' do 16 | inherit! :complete 17 | # Pods for testing 18 | end 19 | 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | use_flipper!() 25 | 26 | post_install do |installer| 27 | react_native_post_install(installer) 28 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 29 | end 30 | end -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost (1.76.0) 3 | - CocoaAsyncSocket (7.6.5) 4 | - DoubleConversion (1.1.6) 5 | - FBLazyVector (0.67.4) 6 | - FBReactNativeSpec (0.67.4): 7 | - RCT-Folly (= 2021.06.28.00-v2) 8 | - RCTRequired (= 0.67.4) 9 | - RCTTypeSafety (= 0.67.4) 10 | - React-Core (= 0.67.4) 11 | - React-jsi (= 0.67.4) 12 | - ReactCommon/turbomodule/core (= 0.67.4) 13 | - Flipper (0.99.0): 14 | - Flipper-Folly (~> 2.6) 15 | - Flipper-RSocket (~> 1.4) 16 | - Flipper-Boost-iOSX (1.76.0.1.11) 17 | - Flipper-DoubleConversion (3.1.7) 18 | - Flipper-Fmt (7.1.7) 19 | - Flipper-Folly (2.6.7): 20 | - Flipper-Boost-iOSX 21 | - Flipper-DoubleConversion 22 | - Flipper-Fmt (= 7.1.7) 23 | - Flipper-Glog 24 | - libevent (~> 2.1.12) 25 | - OpenSSL-Universal (= 1.1.180) 26 | - Flipper-Glog (0.3.6) 27 | - Flipper-PeerTalk (0.0.4) 28 | - Flipper-RSocket (1.4.3): 29 | - Flipper-Folly (~> 2.6) 30 | - FlipperKit (0.99.0): 31 | - FlipperKit/Core (= 0.99.0) 32 | - FlipperKit/Core (0.99.0): 33 | - Flipper (~> 0.99.0) 34 | - FlipperKit/CppBridge 35 | - FlipperKit/FBCxxFollyDynamicConvert 36 | - FlipperKit/FBDefines 37 | - FlipperKit/FKPortForwarding 38 | - FlipperKit/CppBridge (0.99.0): 39 | - Flipper (~> 0.99.0) 40 | - FlipperKit/FBCxxFollyDynamicConvert (0.99.0): 41 | - Flipper-Folly (~> 2.6) 42 | - FlipperKit/FBDefines (0.99.0) 43 | - FlipperKit/FKPortForwarding (0.99.0): 44 | - CocoaAsyncSocket (~> 7.6) 45 | - Flipper-PeerTalk (~> 0.0.4) 46 | - FlipperKit/FlipperKitHighlightOverlay (0.99.0) 47 | - FlipperKit/FlipperKitLayoutHelpers (0.99.0): 48 | - FlipperKit/Core 49 | - FlipperKit/FlipperKitHighlightOverlay 50 | - FlipperKit/FlipperKitLayoutTextSearchable 51 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.99.0): 52 | - FlipperKit/Core 53 | - FlipperKit/FlipperKitHighlightOverlay 54 | - FlipperKit/FlipperKitLayoutHelpers 55 | - YogaKit (~> 1.18) 56 | - FlipperKit/FlipperKitLayoutPlugin (0.99.0): 57 | - FlipperKit/Core 58 | - FlipperKit/FlipperKitHighlightOverlay 59 | - FlipperKit/FlipperKitLayoutHelpers 60 | - FlipperKit/FlipperKitLayoutIOSDescriptors 61 | - FlipperKit/FlipperKitLayoutTextSearchable 62 | - YogaKit (~> 1.18) 63 | - FlipperKit/FlipperKitLayoutTextSearchable (0.99.0) 64 | - FlipperKit/FlipperKitNetworkPlugin (0.99.0): 65 | - FlipperKit/Core 66 | - FlipperKit/FlipperKitReactPlugin (0.99.0): 67 | - FlipperKit/Core 68 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.99.0): 69 | - FlipperKit/Core 70 | - FlipperKit/SKIOSNetworkPlugin (0.99.0): 71 | - FlipperKit/Core 72 | - FlipperKit/FlipperKitNetworkPlugin 73 | - fmt (6.2.1) 74 | - glog (0.3.5) 75 | - libevent (2.1.12) 76 | - OpenSSL-Universal (1.1.180) 77 | - RCT-Folly (2021.06.28.00-v2): 78 | - boost 79 | - DoubleConversion 80 | - fmt (~> 6.2.1) 81 | - glog 82 | - RCT-Folly/Default (= 2021.06.28.00-v2) 83 | - RCT-Folly/Default (2021.06.28.00-v2): 84 | - boost 85 | - DoubleConversion 86 | - fmt (~> 6.2.1) 87 | - glog 88 | - RCTRequired (0.67.4) 89 | - RCTTypeSafety (0.67.4): 90 | - FBLazyVector (= 0.67.4) 91 | - RCT-Folly (= 2021.06.28.00-v2) 92 | - RCTRequired (= 0.67.4) 93 | - React-Core (= 0.67.4) 94 | - React (0.67.4): 95 | - React-Core (= 0.67.4) 96 | - React-Core/DevSupport (= 0.67.4) 97 | - React-Core/RCTWebSocket (= 0.67.4) 98 | - React-RCTActionSheet (= 0.67.4) 99 | - React-RCTAnimation (= 0.67.4) 100 | - React-RCTBlob (= 0.67.4) 101 | - React-RCTImage (= 0.67.4) 102 | - React-RCTLinking (= 0.67.4) 103 | - React-RCTNetwork (= 0.67.4) 104 | - React-RCTSettings (= 0.67.4) 105 | - React-RCTText (= 0.67.4) 106 | - React-RCTVibration (= 0.67.4) 107 | - React-callinvoker (0.67.4) 108 | - React-Core (0.67.4): 109 | - glog 110 | - RCT-Folly (= 2021.06.28.00-v2) 111 | - React-Core/Default (= 0.67.4) 112 | - React-cxxreact (= 0.67.4) 113 | - React-jsi (= 0.67.4) 114 | - React-jsiexecutor (= 0.67.4) 115 | - React-perflogger (= 0.67.4) 116 | - Yoga 117 | - React-Core/CoreModulesHeaders (0.67.4): 118 | - glog 119 | - RCT-Folly (= 2021.06.28.00-v2) 120 | - React-Core/Default 121 | - React-cxxreact (= 0.67.4) 122 | - React-jsi (= 0.67.4) 123 | - React-jsiexecutor (= 0.67.4) 124 | - React-perflogger (= 0.67.4) 125 | - Yoga 126 | - React-Core/Default (0.67.4): 127 | - glog 128 | - RCT-Folly (= 2021.06.28.00-v2) 129 | - React-cxxreact (= 0.67.4) 130 | - React-jsi (= 0.67.4) 131 | - React-jsiexecutor (= 0.67.4) 132 | - React-perflogger (= 0.67.4) 133 | - Yoga 134 | - React-Core/DevSupport (0.67.4): 135 | - glog 136 | - RCT-Folly (= 2021.06.28.00-v2) 137 | - React-Core/Default (= 0.67.4) 138 | - React-Core/RCTWebSocket (= 0.67.4) 139 | - React-cxxreact (= 0.67.4) 140 | - React-jsi (= 0.67.4) 141 | - React-jsiexecutor (= 0.67.4) 142 | - React-jsinspector (= 0.67.4) 143 | - React-perflogger (= 0.67.4) 144 | - Yoga 145 | - React-Core/RCTActionSheetHeaders (0.67.4): 146 | - glog 147 | - RCT-Folly (= 2021.06.28.00-v2) 148 | - React-Core/Default 149 | - React-cxxreact (= 0.67.4) 150 | - React-jsi (= 0.67.4) 151 | - React-jsiexecutor (= 0.67.4) 152 | - React-perflogger (= 0.67.4) 153 | - Yoga 154 | - React-Core/RCTAnimationHeaders (0.67.4): 155 | - glog 156 | - RCT-Folly (= 2021.06.28.00-v2) 157 | - React-Core/Default 158 | - React-cxxreact (= 0.67.4) 159 | - React-jsi (= 0.67.4) 160 | - React-jsiexecutor (= 0.67.4) 161 | - React-perflogger (= 0.67.4) 162 | - Yoga 163 | - React-Core/RCTBlobHeaders (0.67.4): 164 | - glog 165 | - RCT-Folly (= 2021.06.28.00-v2) 166 | - React-Core/Default 167 | - React-cxxreact (= 0.67.4) 168 | - React-jsi (= 0.67.4) 169 | - React-jsiexecutor (= 0.67.4) 170 | - React-perflogger (= 0.67.4) 171 | - Yoga 172 | - React-Core/RCTImageHeaders (0.67.4): 173 | - glog 174 | - RCT-Folly (= 2021.06.28.00-v2) 175 | - React-Core/Default 176 | - React-cxxreact (= 0.67.4) 177 | - React-jsi (= 0.67.4) 178 | - React-jsiexecutor (= 0.67.4) 179 | - React-perflogger (= 0.67.4) 180 | - Yoga 181 | - React-Core/RCTLinkingHeaders (0.67.4): 182 | - glog 183 | - RCT-Folly (= 2021.06.28.00-v2) 184 | - React-Core/Default 185 | - React-cxxreact (= 0.67.4) 186 | - React-jsi (= 0.67.4) 187 | - React-jsiexecutor (= 0.67.4) 188 | - React-perflogger (= 0.67.4) 189 | - Yoga 190 | - React-Core/RCTNetworkHeaders (0.67.4): 191 | - glog 192 | - RCT-Folly (= 2021.06.28.00-v2) 193 | - React-Core/Default 194 | - React-cxxreact (= 0.67.4) 195 | - React-jsi (= 0.67.4) 196 | - React-jsiexecutor (= 0.67.4) 197 | - React-perflogger (= 0.67.4) 198 | - Yoga 199 | - React-Core/RCTSettingsHeaders (0.67.4): 200 | - glog 201 | - RCT-Folly (= 2021.06.28.00-v2) 202 | - React-Core/Default 203 | - React-cxxreact (= 0.67.4) 204 | - React-jsi (= 0.67.4) 205 | - React-jsiexecutor (= 0.67.4) 206 | - React-perflogger (= 0.67.4) 207 | - Yoga 208 | - React-Core/RCTTextHeaders (0.67.4): 209 | - glog 210 | - RCT-Folly (= 2021.06.28.00-v2) 211 | - React-Core/Default 212 | - React-cxxreact (= 0.67.4) 213 | - React-jsi (= 0.67.4) 214 | - React-jsiexecutor (= 0.67.4) 215 | - React-perflogger (= 0.67.4) 216 | - Yoga 217 | - React-Core/RCTVibrationHeaders (0.67.4): 218 | - glog 219 | - RCT-Folly (= 2021.06.28.00-v2) 220 | - React-Core/Default 221 | - React-cxxreact (= 0.67.4) 222 | - React-jsi (= 0.67.4) 223 | - React-jsiexecutor (= 0.67.4) 224 | - React-perflogger (= 0.67.4) 225 | - Yoga 226 | - React-Core/RCTWebSocket (0.67.4): 227 | - glog 228 | - RCT-Folly (= 2021.06.28.00-v2) 229 | - React-Core/Default (= 0.67.4) 230 | - React-cxxreact (= 0.67.4) 231 | - React-jsi (= 0.67.4) 232 | - React-jsiexecutor (= 0.67.4) 233 | - React-perflogger (= 0.67.4) 234 | - Yoga 235 | - React-CoreModules (0.67.4): 236 | - FBReactNativeSpec (= 0.67.4) 237 | - RCT-Folly (= 2021.06.28.00-v2) 238 | - RCTTypeSafety (= 0.67.4) 239 | - React-Core/CoreModulesHeaders (= 0.67.4) 240 | - React-jsi (= 0.67.4) 241 | - React-RCTImage (= 0.67.4) 242 | - ReactCommon/turbomodule/core (= 0.67.4) 243 | - React-cxxreact (0.67.4): 244 | - boost (= 1.76.0) 245 | - DoubleConversion 246 | - glog 247 | - RCT-Folly (= 2021.06.28.00-v2) 248 | - React-callinvoker (= 0.67.4) 249 | - React-jsi (= 0.67.4) 250 | - React-jsinspector (= 0.67.4) 251 | - React-logger (= 0.67.4) 252 | - React-perflogger (= 0.67.4) 253 | - React-runtimeexecutor (= 0.67.4) 254 | - React-jsi (0.67.4): 255 | - boost (= 1.76.0) 256 | - DoubleConversion 257 | - glog 258 | - RCT-Folly (= 2021.06.28.00-v2) 259 | - React-jsi/Default (= 0.67.4) 260 | - React-jsi/Default (0.67.4): 261 | - boost (= 1.76.0) 262 | - DoubleConversion 263 | - glog 264 | - RCT-Folly (= 2021.06.28.00-v2) 265 | - React-jsiexecutor (0.67.4): 266 | - DoubleConversion 267 | - glog 268 | - RCT-Folly (= 2021.06.28.00-v2) 269 | - React-cxxreact (= 0.67.4) 270 | - React-jsi (= 0.67.4) 271 | - React-perflogger (= 0.67.4) 272 | - React-jsinspector (0.67.4) 273 | - React-logger (0.67.4): 274 | - glog 275 | - React-perflogger (0.67.4) 276 | - React-RCTActionSheet (0.67.4): 277 | - React-Core/RCTActionSheetHeaders (= 0.67.4) 278 | - React-RCTAnimation (0.67.4): 279 | - FBReactNativeSpec (= 0.67.4) 280 | - RCT-Folly (= 2021.06.28.00-v2) 281 | - RCTTypeSafety (= 0.67.4) 282 | - React-Core/RCTAnimationHeaders (= 0.67.4) 283 | - React-jsi (= 0.67.4) 284 | - ReactCommon/turbomodule/core (= 0.67.4) 285 | - React-RCTBlob (0.67.4): 286 | - FBReactNativeSpec (= 0.67.4) 287 | - RCT-Folly (= 2021.06.28.00-v2) 288 | - React-Core/RCTBlobHeaders (= 0.67.4) 289 | - React-Core/RCTWebSocket (= 0.67.4) 290 | - React-jsi (= 0.67.4) 291 | - React-RCTNetwork (= 0.67.4) 292 | - ReactCommon/turbomodule/core (= 0.67.4) 293 | - React-RCTImage (0.67.4): 294 | - FBReactNativeSpec (= 0.67.4) 295 | - RCT-Folly (= 2021.06.28.00-v2) 296 | - RCTTypeSafety (= 0.67.4) 297 | - React-Core/RCTImageHeaders (= 0.67.4) 298 | - React-jsi (= 0.67.4) 299 | - React-RCTNetwork (= 0.67.4) 300 | - ReactCommon/turbomodule/core (= 0.67.4) 301 | - React-RCTLinking (0.67.4): 302 | - FBReactNativeSpec (= 0.67.4) 303 | - React-Core/RCTLinkingHeaders (= 0.67.4) 304 | - React-jsi (= 0.67.4) 305 | - ReactCommon/turbomodule/core (= 0.67.4) 306 | - React-RCTNetwork (0.67.4): 307 | - FBReactNativeSpec (= 0.67.4) 308 | - RCT-Folly (= 2021.06.28.00-v2) 309 | - RCTTypeSafety (= 0.67.4) 310 | - React-Core/RCTNetworkHeaders (= 0.67.4) 311 | - React-jsi (= 0.67.4) 312 | - ReactCommon/turbomodule/core (= 0.67.4) 313 | - React-RCTSettings (0.67.4): 314 | - FBReactNativeSpec (= 0.67.4) 315 | - RCT-Folly (= 2021.06.28.00-v2) 316 | - RCTTypeSafety (= 0.67.4) 317 | - React-Core/RCTSettingsHeaders (= 0.67.4) 318 | - React-jsi (= 0.67.4) 319 | - ReactCommon/turbomodule/core (= 0.67.4) 320 | - React-RCTText (0.67.4): 321 | - React-Core/RCTTextHeaders (= 0.67.4) 322 | - React-RCTVibration (0.67.4): 323 | - FBReactNativeSpec (= 0.67.4) 324 | - RCT-Folly (= 2021.06.28.00-v2) 325 | - React-Core/RCTVibrationHeaders (= 0.67.4) 326 | - React-jsi (= 0.67.4) 327 | - ReactCommon/turbomodule/core (= 0.67.4) 328 | - React-runtimeexecutor (0.67.4): 329 | - React-jsi (= 0.67.4) 330 | - ReactCommon/turbomodule/core (0.67.4): 331 | - DoubleConversion 332 | - glog 333 | - RCT-Folly (= 2021.06.28.00-v2) 334 | - React-callinvoker (= 0.67.4) 335 | - React-Core (= 0.67.4) 336 | - React-cxxreact (= 0.67.4) 337 | - React-jsi (= 0.67.4) 338 | - React-logger (= 0.67.4) 339 | - React-perflogger (= 0.67.4) 340 | - RNReanimated (2.5.0): 341 | - DoubleConversion 342 | - FBLazyVector 343 | - FBReactNativeSpec 344 | - glog 345 | - RCT-Folly 346 | - RCTRequired 347 | - RCTTypeSafety 348 | - React 349 | - React-callinvoker 350 | - React-Core 351 | - React-Core/DevSupport 352 | - React-Core/RCTWebSocket 353 | - React-CoreModules 354 | - React-cxxreact 355 | - React-jsi 356 | - React-jsiexecutor 357 | - React-jsinspector 358 | - React-RCTActionSheet 359 | - React-RCTAnimation 360 | - React-RCTBlob 361 | - React-RCTImage 362 | - React-RCTLinking 363 | - React-RCTNetwork 364 | - React-RCTSettings 365 | - React-RCTText 366 | - ReactCommon/turbomodule/core 367 | - Yoga 368 | - RNSVG (12.3.0): 369 | - React-Core 370 | - Yoga (1.14.0) 371 | - YogaKit (1.18.1): 372 | - Yoga (~> 1.14) 373 | 374 | DEPENDENCIES: 375 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) 376 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 377 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 378 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 379 | - Flipper (= 0.99.0) 380 | - Flipper-Boost-iOSX (= 1.76.0.1.11) 381 | - Flipper-DoubleConversion (= 3.1.7) 382 | - Flipper-Fmt (= 7.1.7) 383 | - Flipper-Folly (= 2.6.7) 384 | - Flipper-Glog (= 0.3.6) 385 | - Flipper-PeerTalk (= 0.0.4) 386 | - Flipper-RSocket (= 1.4.3) 387 | - FlipperKit (= 0.99.0) 388 | - FlipperKit/Core (= 0.99.0) 389 | - FlipperKit/CppBridge (= 0.99.0) 390 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.99.0) 391 | - FlipperKit/FBDefines (= 0.99.0) 392 | - FlipperKit/FKPortForwarding (= 0.99.0) 393 | - FlipperKit/FlipperKitHighlightOverlay (= 0.99.0) 394 | - FlipperKit/FlipperKitLayoutPlugin (= 0.99.0) 395 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.99.0) 396 | - FlipperKit/FlipperKitNetworkPlugin (= 0.99.0) 397 | - FlipperKit/FlipperKitReactPlugin (= 0.99.0) 398 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0) 399 | - FlipperKit/SKIOSNetworkPlugin (= 0.99.0) 400 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 401 | - OpenSSL-Universal (= 1.1.180) 402 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 403 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 404 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 405 | - React (from `../node_modules/react-native/`) 406 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 407 | - React-Core (from `../node_modules/react-native/`) 408 | - React-Core/DevSupport (from `../node_modules/react-native/`) 409 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 410 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 411 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 412 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 413 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 414 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 415 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`) 416 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 417 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 418 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 419 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 420 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 421 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 422 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 423 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 424 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 425 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 426 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 427 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 428 | - RNReanimated (from `../node_modules/react-native-reanimated`) 429 | - RNSVG (from `../node_modules/react-native-svg`) 430 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 431 | 432 | SPEC REPOS: 433 | trunk: 434 | - CocoaAsyncSocket 435 | - Flipper 436 | - Flipper-Boost-iOSX 437 | - Flipper-DoubleConversion 438 | - Flipper-Fmt 439 | - Flipper-Folly 440 | - Flipper-Glog 441 | - Flipper-PeerTalk 442 | - Flipper-RSocket 443 | - FlipperKit 444 | - fmt 445 | - libevent 446 | - OpenSSL-Universal 447 | - YogaKit 448 | 449 | EXTERNAL SOURCES: 450 | boost: 451 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" 452 | DoubleConversion: 453 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 454 | FBLazyVector: 455 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 456 | FBReactNativeSpec: 457 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 458 | glog: 459 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 460 | RCT-Folly: 461 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 462 | RCTRequired: 463 | :path: "../node_modules/react-native/Libraries/RCTRequired" 464 | RCTTypeSafety: 465 | :path: "../node_modules/react-native/Libraries/TypeSafety" 466 | React: 467 | :path: "../node_modules/react-native/" 468 | React-callinvoker: 469 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 470 | React-Core: 471 | :path: "../node_modules/react-native/" 472 | React-CoreModules: 473 | :path: "../node_modules/react-native/React/CoreModules" 474 | React-cxxreact: 475 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 476 | React-jsi: 477 | :path: "../node_modules/react-native/ReactCommon/jsi" 478 | React-jsiexecutor: 479 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 480 | React-jsinspector: 481 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 482 | React-logger: 483 | :path: "../node_modules/react-native/ReactCommon/logger" 484 | React-perflogger: 485 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 486 | React-RCTActionSheet: 487 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 488 | React-RCTAnimation: 489 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 490 | React-RCTBlob: 491 | :path: "../node_modules/react-native/Libraries/Blob" 492 | React-RCTImage: 493 | :path: "../node_modules/react-native/Libraries/Image" 494 | React-RCTLinking: 495 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 496 | React-RCTNetwork: 497 | :path: "../node_modules/react-native/Libraries/Network" 498 | React-RCTSettings: 499 | :path: "../node_modules/react-native/Libraries/Settings" 500 | React-RCTText: 501 | :path: "../node_modules/react-native/Libraries/Text" 502 | React-RCTVibration: 503 | :path: "../node_modules/react-native/Libraries/Vibration" 504 | React-runtimeexecutor: 505 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 506 | ReactCommon: 507 | :path: "../node_modules/react-native/ReactCommon" 508 | RNReanimated: 509 | :path: "../node_modules/react-native-reanimated" 510 | RNSVG: 511 | :path: "../node_modules/react-native-svg" 512 | Yoga: 513 | :path: "../node_modules/react-native/ReactCommon/yoga" 514 | 515 | SPEC CHECKSUMS: 516 | boost: a7c83b31436843459a1961bfd74b96033dc77234 517 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 518 | DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 519 | FBLazyVector: f7b0632c6437e312acf6349288d9aa4cb6d59030 520 | FBReactNativeSpec: 0f4e1f4cfeace095694436e7c7fcc5bf4b03a0ff 521 | Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733 522 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c 523 | Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c 524 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b 525 | Flipper-Folly: 83af37379faa69497529e414bd43fbfc7cae259a 526 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 527 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 528 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 529 | FlipperKit: d8d346844eca5d9120c17d441a2f38596e8ed2b9 530 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 531 | glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 532 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 533 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b 534 | RCT-Folly: 803a9cfd78114b2ec0f140cfa6fa2a6bafb2d685 535 | RCTRequired: 0aa6c1c27e1d65920df35ceea5341a5fe76bdb79 536 | RCTTypeSafety: d76a59d00632891e11ed7522dba3fd1a995e573a 537 | React: ab8c09da2e7704f4b3ebad4baa6cfdfcc852dcb5 538 | React-callinvoker: 216fb96b482da516b8aba4142b145938f6ea92f0 539 | React-Core: af99b93aff83599485e0e0879879aafa35ceae32 540 | React-CoreModules: 137a054ce8c547e81dc3502933b1bc0fd08df05d 541 | React-cxxreact: ec5ee6b08664f5b8ac71d8ad912f54d540c4f817 542 | React-jsi: 3e084c80fd364cee64668d5df46d40c39f7973e1 543 | React-jsiexecutor: cbdf37cebdc4f5d8b3d0bf5ccaa6147fd9de9f3d 544 | React-jsinspector: f4775ea9118cbe1f72b834f0f842baa7a99508d8 545 | React-logger: a1f028f6d8639a3f364ef80419e5e862e1115250 546 | React-perflogger: 0afaf2f01a47fd0fc368a93bfbb5bd3b26db6e7f 547 | React-RCTActionSheet: 59f35c4029e0b532fc42114241a06e170b7431a2 548 | React-RCTAnimation: aae4f4bed122e78bdab72f7118d291d70a932ce2 549 | React-RCTBlob: f6fb23394b4f28cd86fa7e9f5f6ae45c23669fda 550 | React-RCTImage: 638815cf96124386dd296067246d91441932ae3f 551 | React-RCTLinking: 254dd06283dd6fdb784285f95e7cec8053c3270f 552 | React-RCTNetwork: 8a4c2d4f357268e520b060572d02bc69a9b991fb 553 | React-RCTSettings: 35d44cbb9972ab933bd0a59ea3e6646dcb030ba3 554 | React-RCTText: cc5315df8458cfa7b537e621271ef43273955a97 555 | React-RCTVibration: 3b52a7dced19cdb025b4f88ab26ceb2d85f30ba2 556 | React-runtimeexecutor: a9d3c82ddf7ffdad9fbe6a81c6d6f8c06385464d 557 | ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e 558 | RNReanimated: 190b6930d5d94832061278e1070bbe313e50c830 559 | RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 560 | Yoga: d6b6a80659aa3e91aaba01d0012e7edcbedcbecd 561 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 562 | 563 | PODFILE CHECKSUM: 175eb31e34f7eb2a5ce4d88d63358d51570101b4 564 | 565 | COCOAPODS: 1.11.3 566 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* reactNativeNestedCommentsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* reactNativeNestedCommentsTests.m */; }; 11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 14 | 6172F2D35A4C3AA820D92908 /* libPods-reactNativeNestedComments.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6423831EA8574132BED9D8CC /* libPods-reactNativeNestedComments.a */; }; 15 | 7EF68E3733C33B6898317E18 /* libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABFE59519B596E51CEFDCCC0 /* libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a */; }; 16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = reactNativeNestedComments; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* reactNativeNestedCommentsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = reactNativeNestedCommentsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* reactNativeNestedCommentsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = reactNativeNestedCommentsTests.m; sourceTree = ""; }; 33 | 13B07F961A680F5B00A75B9A /* reactNativeNestedComments.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = reactNativeNestedComments.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = reactNativeNestedComments/AppDelegate.h; sourceTree = ""; }; 35 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = reactNativeNestedComments/AppDelegate.m; sourceTree = ""; }; 36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = reactNativeNestedComments/Images.xcassets; sourceTree = ""; }; 37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = reactNativeNestedComments/Info.plist; sourceTree = ""; }; 38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = reactNativeNestedComments/main.m; sourceTree = ""; }; 39 | 1D0AE47A65C8663E3B452821 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.release.xcconfig"; path = "Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.release.xcconfig"; sourceTree = ""; }; 40 | 6423831EA8574132BED9D8CC /* libPods-reactNativeNestedComments.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reactNativeNestedComments.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 6C97AB639B58BBB4B15BBE30 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.debug.xcconfig"; path = "Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.debug.xcconfig"; sourceTree = ""; }; 42 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = reactNativeNestedComments/LaunchScreen.storyboard; sourceTree = ""; }; 43 | ABFE59519B596E51CEFDCCC0 /* libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | C0A881CF5CF3F2B244570E2A /* Pods-reactNativeNestedComments.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactNativeNestedComments.debug.xcconfig"; path = "Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments.debug.xcconfig"; sourceTree = ""; }; 45 | D00AAFFCFCFDA5787532823F /* Pods-reactNativeNestedComments.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactNativeNestedComments.release.xcconfig"; path = "Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 7EF68E3733C33B6898317E18 /* libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 6172F2D35A4C3AA820D92908 /* libPods-reactNativeNestedComments.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* reactNativeNestedCommentsTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* reactNativeNestedCommentsTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = reactNativeNestedCommentsTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* reactNativeNestedComments */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = reactNativeNestedComments; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 6423831EA8574132BED9D8CC /* libPods-reactNativeNestedComments.a */, 104 | ABFE59519B596E51CEFDCCC0 /* libPods-reactNativeNestedComments-reactNativeNestedCommentsTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ); 113 | name = Libraries; 114 | sourceTree = ""; 115 | }; 116 | 83CBB9F61A601CBA00E9B192 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 13B07FAE1A68108700A75B9A /* reactNativeNestedComments */, 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 121 | 00E356EF1AD99517003FC87E /* reactNativeNestedCommentsTests */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | E233CBF5F47BEE60B243DCF8 /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* reactNativeNestedComments.app */, 135 | 00E356EE1AD99517003FC87E /* reactNativeNestedCommentsTests.xctest */, 136 | ); 137 | name = Products; 138 | sourceTree = ""; 139 | }; 140 | E233CBF5F47BEE60B243DCF8 /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | C0A881CF5CF3F2B244570E2A /* Pods-reactNativeNestedComments.debug.xcconfig */, 144 | D00AAFFCFCFDA5787532823F /* Pods-reactNativeNestedComments.release.xcconfig */, 145 | 6C97AB639B58BBB4B15BBE30 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.debug.xcconfig */, 146 | 1D0AE47A65C8663E3B452821 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.release.xcconfig */, 147 | ); 148 | name = Pods; 149 | path = Pods; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | 00E356ED1AD99517003FC87E /* reactNativeNestedCommentsTests */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactNativeNestedCommentsTests" */; 158 | buildPhases = ( 159 | A130D646172E58E1D159D8F2 /* [CP] Check Pods Manifest.lock */, 160 | 00E356EA1AD99517003FC87E /* Sources */, 161 | 00E356EB1AD99517003FC87E /* Frameworks */, 162 | 00E356EC1AD99517003FC87E /* Resources */, 163 | 077E01280D4B4AD18B2E1770 /* [CP] Embed Pods Frameworks */, 164 | 4E62BDF20514810D028A5FBF /* [CP] Copy Pods Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 170 | ); 171 | name = reactNativeNestedCommentsTests; 172 | productName = reactNativeNestedCommentsTests; 173 | productReference = 00E356EE1AD99517003FC87E /* reactNativeNestedCommentsTests.xctest */; 174 | productType = "com.apple.product-type.bundle.unit-test"; 175 | }; 176 | 13B07F861A680F5B00A75B9A /* reactNativeNestedComments */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactNativeNestedComments" */; 179 | buildPhases = ( 180 | 3E482C27206C4DEF2FE45063 /* [CP] Check Pods Manifest.lock */, 181 | FD10A7F022414F080027D42C /* Start Packager */, 182 | 13B07F871A680F5B00A75B9A /* Sources */, 183 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 184 | 13B07F8E1A680F5B00A75B9A /* Resources */, 185 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 186 | C8AC78B0264D0F9F6F6D630E /* [CP] Embed Pods Frameworks */, 187 | ADC9DDC32298B72B3CF5DC8E /* [CP] Copy Pods Resources */, 188 | ); 189 | buildRules = ( 190 | ); 191 | dependencies = ( 192 | ); 193 | name = reactNativeNestedComments; 194 | productName = reactNativeNestedComments; 195 | productReference = 13B07F961A680F5B00A75B9A /* reactNativeNestedComments.app */; 196 | productType = "com.apple.product-type.application"; 197 | }; 198 | /* End PBXNativeTarget section */ 199 | 200 | /* Begin PBXProject section */ 201 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 202 | isa = PBXProject; 203 | attributes = { 204 | LastUpgradeCheck = 1210; 205 | TargetAttributes = { 206 | 00E356ED1AD99517003FC87E = { 207 | CreatedOnToolsVersion = 6.2; 208 | TestTargetID = 13B07F861A680F5B00A75B9A; 209 | }; 210 | 13B07F861A680F5B00A75B9A = { 211 | LastSwiftMigration = 1120; 212 | }; 213 | }; 214 | }; 215 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactNativeNestedComments" */; 216 | compatibilityVersion = "Xcode 12.0"; 217 | developmentRegion = en; 218 | hasScannedForEncodings = 0; 219 | knownRegions = ( 220 | en, 221 | Base, 222 | ); 223 | mainGroup = 83CBB9F61A601CBA00E9B192; 224 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 225 | projectDirPath = ""; 226 | projectRoot = ""; 227 | targets = ( 228 | 13B07F861A680F5B00A75B9A /* reactNativeNestedComments */, 229 | 00E356ED1AD99517003FC87E /* reactNativeNestedCommentsTests */, 230 | ); 231 | }; 232 | /* End PBXProject section */ 233 | 234 | /* Begin PBXResourcesBuildPhase section */ 235 | 00E356EC1AD99517003FC87E /* Resources */ = { 236 | isa = PBXResourcesBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 243 | isa = PBXResourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 247 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXResourcesBuildPhase section */ 252 | 253 | /* Begin PBXShellScriptBuildPhase section */ 254 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | ); 261 | name = "Bundle React Native code and images"; 262 | outputPaths = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; 267 | }; 268 | 077E01280D4B4AD18B2E1770 /* [CP] Embed Pods Frameworks */ = { 269 | isa = PBXShellScriptBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ); 273 | inputFileListPaths = ( 274 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 275 | ); 276 | name = "[CP] Embed Pods Frameworks"; 277 | outputFileListPaths = ( 278 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | shellPath = /bin/sh; 282 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-frameworks.sh\"\n"; 283 | showEnvVarsInLog = 0; 284 | }; 285 | 3E482C27206C4DEF2FE45063 /* [CP] Check Pods Manifest.lock */ = { 286 | isa = PBXShellScriptBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | ); 290 | inputFileListPaths = ( 291 | ); 292 | inputPaths = ( 293 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 294 | "${PODS_ROOT}/Manifest.lock", 295 | ); 296 | name = "[CP] Check Pods Manifest.lock"; 297 | outputFileListPaths = ( 298 | ); 299 | outputPaths = ( 300 | "$(DERIVED_FILE_DIR)/Pods-reactNativeNestedComments-checkManifestLockResult.txt", 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | shellPath = /bin/sh; 304 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 305 | showEnvVarsInLog = 0; 306 | }; 307 | 4E62BDF20514810D028A5FBF /* [CP] Copy Pods Resources */ = { 308 | isa = PBXShellScriptBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | ); 312 | inputFileListPaths = ( 313 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-resources-${CONFIGURATION}-input-files.xcfilelist", 314 | ); 315 | name = "[CP] Copy Pods Resources"; 316 | outputFileListPaths = ( 317 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-resources-${CONFIGURATION}-output-files.xcfilelist", 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | shellPath = /bin/sh; 321 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-resources.sh\"\n"; 322 | showEnvVarsInLog = 0; 323 | }; 324 | A130D646172E58E1D159D8F2 /* [CP] Check Pods Manifest.lock */ = { 325 | isa = PBXShellScriptBuildPhase; 326 | buildActionMask = 2147483647; 327 | files = ( 328 | ); 329 | inputFileListPaths = ( 330 | ); 331 | inputPaths = ( 332 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 333 | "${PODS_ROOT}/Manifest.lock", 334 | ); 335 | name = "[CP] Check Pods Manifest.lock"; 336 | outputFileListPaths = ( 337 | ); 338 | outputPaths = ( 339 | "$(DERIVED_FILE_DIR)/Pods-reactNativeNestedComments-reactNativeNestedCommentsTests-checkManifestLockResult.txt", 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | shellPath = /bin/sh; 343 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 344 | showEnvVarsInLog = 0; 345 | }; 346 | ADC9DDC32298B72B3CF5DC8E /* [CP] Copy Pods Resources */ = { 347 | isa = PBXShellScriptBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | ); 351 | inputFileListPaths = ( 352 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-resources-${CONFIGURATION}-input-files.xcfilelist", 353 | ); 354 | name = "[CP] Copy Pods Resources"; 355 | outputFileListPaths = ( 356 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-resources-${CONFIGURATION}-output-files.xcfilelist", 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | shellPath = /bin/sh; 360 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-resources.sh\"\n"; 361 | showEnvVarsInLog = 0; 362 | }; 363 | C8AC78B0264D0F9F6F6D630E /* [CP] Embed Pods Frameworks */ = { 364 | isa = PBXShellScriptBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | ); 368 | inputFileListPaths = ( 369 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-frameworks-${CONFIGURATION}-input-files.xcfilelist", 370 | ); 371 | name = "[CP] Embed Pods Frameworks"; 372 | outputFileListPaths = ( 373 | "${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-frameworks-${CONFIGURATION}-output-files.xcfilelist", 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | shellPath = /bin/sh; 377 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactNativeNestedComments/Pods-reactNativeNestedComments-frameworks.sh\"\n"; 378 | showEnvVarsInLog = 0; 379 | }; 380 | FD10A7F022414F080027D42C /* Start Packager */ = { 381 | isa = PBXShellScriptBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | ); 385 | inputFileListPaths = ( 386 | ); 387 | inputPaths = ( 388 | ); 389 | name = "Start Packager"; 390 | outputFileListPaths = ( 391 | ); 392 | outputPaths = ( 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | shellPath = /bin/sh; 396 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 397 | showEnvVarsInLog = 0; 398 | }; 399 | /* End PBXShellScriptBuildPhase section */ 400 | 401 | /* Begin PBXSourcesBuildPhase section */ 402 | 00E356EA1AD99517003FC87E /* Sources */ = { 403 | isa = PBXSourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | 00E356F31AD99517003FC87E /* reactNativeNestedCommentsTests.m in Sources */, 407 | ); 408 | runOnlyForDeploymentPostprocessing = 0; 409 | }; 410 | 13B07F871A680F5B00A75B9A /* Sources */ = { 411 | isa = PBXSourcesBuildPhase; 412 | buildActionMask = 2147483647; 413 | files = ( 414 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 415 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 416 | ); 417 | runOnlyForDeploymentPostprocessing = 0; 418 | }; 419 | /* End PBXSourcesBuildPhase section */ 420 | 421 | /* Begin PBXTargetDependency section */ 422 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 423 | isa = PBXTargetDependency; 424 | target = 13B07F861A680F5B00A75B9A /* reactNativeNestedComments */; 425 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 426 | }; 427 | /* End PBXTargetDependency section */ 428 | 429 | /* Begin XCBuildConfiguration section */ 430 | 00E356F61AD99517003FC87E /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | baseConfigurationReference = 6C97AB639B58BBB4B15BBE30 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.debug.xcconfig */; 433 | buildSettings = { 434 | BUNDLE_LOADER = "$(TEST_HOST)"; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | INFOPLIST_FILE = reactNativeNestedCommentsTests/Info.plist; 440 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 441 | LD_RUNPATH_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "@executable_path/Frameworks", 444 | "@loader_path/Frameworks", 445 | ); 446 | OTHER_LDFLAGS = ( 447 | "-ObjC", 448 | "-lc++", 449 | "$(inherited)", 450 | ); 451 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeNestedComments.app/reactNativeNestedComments"; 454 | }; 455 | name = Debug; 456 | }; 457 | 00E356F71AD99517003FC87E /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = 1D0AE47A65C8663E3B452821 /* Pods-reactNativeNestedComments-reactNativeNestedCommentsTests.release.xcconfig */; 460 | buildSettings = { 461 | BUNDLE_LOADER = "$(TEST_HOST)"; 462 | COPY_PHASE_STRIP = NO; 463 | INFOPLIST_FILE = reactNativeNestedCommentsTests/Info.plist; 464 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 465 | LD_RUNPATH_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "@executable_path/Frameworks", 468 | "@loader_path/Frameworks", 469 | ); 470 | OTHER_LDFLAGS = ( 471 | "-ObjC", 472 | "-lc++", 473 | "$(inherited)", 474 | ); 475 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeNestedComments.app/reactNativeNestedComments"; 478 | }; 479 | name = Release; 480 | }; 481 | 13B07F941A680F5B00A75B9A /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | baseConfigurationReference = C0A881CF5CF3F2B244570E2A /* Pods-reactNativeNestedComments.debug.xcconfig */; 484 | buildSettings = { 485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 486 | CLANG_ENABLE_MODULES = YES; 487 | CURRENT_PROJECT_VERSION = 1; 488 | ENABLE_BITCODE = NO; 489 | INFOPLIST_FILE = reactNativeNestedComments/Info.plist; 490 | LD_RUNPATH_SEARCH_PATHS = ( 491 | "$(inherited)", 492 | "@executable_path/Frameworks", 493 | ); 494 | OTHER_LDFLAGS = ( 495 | "$(inherited)", 496 | "-ObjC", 497 | "-lc++", 498 | ); 499 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 500 | PRODUCT_NAME = reactNativeNestedComments; 501 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 502 | SWIFT_VERSION = 5.0; 503 | VERSIONING_SYSTEM = "apple-generic"; 504 | }; 505 | name = Debug; 506 | }; 507 | 13B07F951A680F5B00A75B9A /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | baseConfigurationReference = D00AAFFCFCFDA5787532823F /* Pods-reactNativeNestedComments.release.xcconfig */; 510 | buildSettings = { 511 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 512 | CLANG_ENABLE_MODULES = YES; 513 | CURRENT_PROJECT_VERSION = 1; 514 | INFOPLIST_FILE = reactNativeNestedComments/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = ( 516 | "$(inherited)", 517 | "@executable_path/Frameworks", 518 | ); 519 | OTHER_LDFLAGS = ( 520 | "$(inherited)", 521 | "-ObjC", 522 | "-lc++", 523 | ); 524 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 525 | PRODUCT_NAME = reactNativeNestedComments; 526 | SWIFT_VERSION = 5.0; 527 | VERSIONING_SYSTEM = "apple-generic"; 528 | }; 529 | name = Release; 530 | }; 531 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | buildSettings = { 534 | ALWAYS_SEARCH_USER_PATHS = NO; 535 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 536 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 537 | CLANG_CXX_LIBRARY = "libc++"; 538 | CLANG_ENABLE_MODULES = YES; 539 | CLANG_ENABLE_OBJC_ARC = YES; 540 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 541 | CLANG_WARN_BOOL_CONVERSION = YES; 542 | CLANG_WARN_COMMA = YES; 543 | CLANG_WARN_CONSTANT_CONVERSION = YES; 544 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 545 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 546 | CLANG_WARN_EMPTY_BODY = YES; 547 | CLANG_WARN_ENUM_CONVERSION = YES; 548 | CLANG_WARN_INFINITE_RECURSION = YES; 549 | CLANG_WARN_INT_CONVERSION = YES; 550 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 551 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 552 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 553 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 554 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 555 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 556 | CLANG_WARN_STRICT_PROTOTYPES = YES; 557 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 558 | CLANG_WARN_UNREACHABLE_CODE = YES; 559 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 560 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 561 | COPY_PHASE_STRIP = NO; 562 | ENABLE_STRICT_OBJC_MSGSEND = YES; 563 | ENABLE_TESTABILITY = YES; 564 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; 565 | GCC_C_LANGUAGE_STANDARD = gnu99; 566 | GCC_DYNAMIC_NO_PIC = NO; 567 | GCC_NO_COMMON_BLOCKS = YES; 568 | GCC_OPTIMIZATION_LEVEL = 0; 569 | GCC_PREPROCESSOR_DEFINITIONS = ( 570 | "DEBUG=1", 571 | "$(inherited)", 572 | ); 573 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 574 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 575 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 576 | GCC_WARN_UNDECLARED_SELECTOR = YES; 577 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 578 | GCC_WARN_UNUSED_FUNCTION = YES; 579 | GCC_WARN_UNUSED_VARIABLE = YES; 580 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 581 | LD_RUNPATH_SEARCH_PATHS = ( 582 | /usr/lib/swift, 583 | "$(inherited)", 584 | ); 585 | LIBRARY_SEARCH_PATHS = ( 586 | "\"$(SDKROOT)/usr/lib/swift\"", 587 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 588 | "\"$(inherited)\"", 589 | ); 590 | MTL_ENABLE_DEBUG_INFO = YES; 591 | ONLY_ACTIVE_ARCH = YES; 592 | SDKROOT = iphoneos; 593 | }; 594 | name = Debug; 595 | }; 596 | 83CBBA211A601CBA00E9B192 /* Release */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | ALWAYS_SEARCH_USER_PATHS = NO; 600 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 601 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 602 | CLANG_CXX_LIBRARY = "libc++"; 603 | CLANG_ENABLE_MODULES = YES; 604 | CLANG_ENABLE_OBJC_ARC = YES; 605 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 606 | CLANG_WARN_BOOL_CONVERSION = YES; 607 | CLANG_WARN_COMMA = YES; 608 | CLANG_WARN_CONSTANT_CONVERSION = YES; 609 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 610 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 611 | CLANG_WARN_EMPTY_BODY = YES; 612 | CLANG_WARN_ENUM_CONVERSION = YES; 613 | CLANG_WARN_INFINITE_RECURSION = YES; 614 | CLANG_WARN_INT_CONVERSION = YES; 615 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 616 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 617 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 618 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 619 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 620 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 621 | CLANG_WARN_STRICT_PROTOTYPES = YES; 622 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 623 | CLANG_WARN_UNREACHABLE_CODE = YES; 624 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 625 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 626 | COPY_PHASE_STRIP = YES; 627 | ENABLE_NS_ASSERTIONS = NO; 628 | ENABLE_STRICT_OBJC_MSGSEND = YES; 629 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; 630 | GCC_C_LANGUAGE_STANDARD = gnu99; 631 | GCC_NO_COMMON_BLOCKS = YES; 632 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 633 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 634 | GCC_WARN_UNDECLARED_SELECTOR = YES; 635 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 636 | GCC_WARN_UNUSED_FUNCTION = YES; 637 | GCC_WARN_UNUSED_VARIABLE = YES; 638 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 639 | LD_RUNPATH_SEARCH_PATHS = ( 640 | /usr/lib/swift, 641 | "$(inherited)", 642 | ); 643 | LIBRARY_SEARCH_PATHS = ( 644 | "\"$(SDKROOT)/usr/lib/swift\"", 645 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 646 | "\"$(inherited)\"", 647 | ); 648 | MTL_ENABLE_DEBUG_INFO = NO; 649 | SDKROOT = iphoneos; 650 | VALIDATE_PRODUCT = YES; 651 | }; 652 | name = Release; 653 | }; 654 | /* End XCBuildConfiguration section */ 655 | 656 | /* Begin XCConfigurationList section */ 657 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactNativeNestedCommentsTests" */ = { 658 | isa = XCConfigurationList; 659 | buildConfigurations = ( 660 | 00E356F61AD99517003FC87E /* Debug */, 661 | 00E356F71AD99517003FC87E /* Release */, 662 | ); 663 | defaultConfigurationIsVisible = 0; 664 | defaultConfigurationName = Release; 665 | }; 666 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactNativeNestedComments" */ = { 667 | isa = XCConfigurationList; 668 | buildConfigurations = ( 669 | 13B07F941A680F5B00A75B9A /* Debug */, 670 | 13B07F951A680F5B00A75B9A /* Release */, 671 | ); 672 | defaultConfigurationIsVisible = 0; 673 | defaultConfigurationName = Release; 674 | }; 675 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactNativeNestedComments" */ = { 676 | isa = XCConfigurationList; 677 | buildConfigurations = ( 678 | 83CBBA201A601CBA00E9B192 /* Debug */, 679 | 83CBBA211A601CBA00E9B192 /* Release */, 680 | ); 681 | defaultConfigurationIsVisible = 0; 682 | defaultConfigurationName = Release; 683 | }; 684 | /* End XCConfigurationList section */ 685 | }; 686 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 687 | } 688 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments.xcodeproj/xcshareddata/xcschemes/reactNativeNestedComments.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #ifdef FB_SONARKIT_ENABLED 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #ifdef FB_SONARKIT_ENABLED 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"reactNativeNestedComments" 37 | initialProperties:nil]; 38 | 39 | if (@available(iOS 13.0, *)) { 40 | rootView.backgroundColor = [UIColor systemBackgroundColor]; 41 | } else { 42 | rootView.backgroundColor = [UIColor whiteColor]; 43 | } 44 | 45 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 46 | UIViewController *rootViewController = [UIViewController new]; 47 | rootViewController.view = rootView; 48 | self.window.rootViewController = rootViewController; 49 | [self.window makeKeyAndVisible]; 50 | return YES; 51 | } 52 | 53 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 54 | { 55 | #if DEBUG 56 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 57 | #else 58 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 59 | #endif 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | reactNativeNestedComments 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/reactNativeNestedComments/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/reactNativeNestedCommentsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/reactNativeNestedCommentsTests/reactNativeNestedCommentsTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface reactNativeNestedCommentsTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation reactNativeNestedCommentsTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reactnativenestedcomments", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx", 11 | "postinstall": "patch-package && jetify" 12 | }, 13 | "dependencies": { 14 | "date-fns": "^2.28.0", 15 | "react": "17.0.2", 16 | "react-native": "0.67.4", 17 | "react-native-iphone-x-helper": "^1.3.1", 18 | "react-native-reanimated": "^2.5.0", 19 | "react-native-svg": "^12.3.0", 20 | "reanimated-collapsible-helpers": "^1.0.0", 21 | "styled-components": "^5.3.5" 22 | }, 23 | "devDependencies": { 24 | "@babel/core": "^7.12.9", 25 | "@babel/runtime": "^7.12.5", 26 | "@react-native-community/eslint-config": "^2.0.0", 27 | "@types/jest": "^26.0.23", 28 | "@types/react-native": "^0.66.15", 29 | "@types/react-test-renderer": "^17.0.1", 30 | "@types/styled-components": "^5.1.24", 31 | "@typescript-eslint/eslint-plugin": "^5.7.0", 32 | "@typescript-eslint/parser": "^5.7.0", 33 | "babel-jest": "^26.6.3", 34 | "eslint": "^7.14.0", 35 | "jest": "^26.6.3", 36 | "metro-react-native-babel-preset": "^0.66.2", 37 | "patch-package": "^6.4.7", 38 | "prettier": "^2.6.1", 39 | "react-test-renderer": "17.0.2", 40 | "typescript": "^4.4.4" 41 | }, 42 | "resolutions": { 43 | "@types/react": "^17" 44 | }, 45 | "jest": { 46 | "preset": "react-native", 47 | "moduleFileExtensions": [ 48 | "ts", 49 | "tsx", 50 | "js", 51 | "jsx", 52 | "json", 53 | "node" 54 | ] 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /patches/reanimated-collapsible-helpers+1.0.0.patch: -------------------------------------------------------------------------------- 1 | diff --git a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/AnimatedSection.d.ts b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/AnimatedSection.d.ts 2 | index 768068e..651f01b 100644 3 | --- a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/AnimatedSection.d.ts 4 | +++ b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/AnimatedSection.d.ts 5 | @@ -3,11 +3,17 @@ import { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native'; 6 | import Animated from 'react-native-reanimated'; 7 | import type { State } from './types'; 8 | declare type Props = { 9 | - children: React.ReactNode; 10 | - onLayout: (event: LayoutChangeEvent) => void; 11 | - animatedHeight: Animated.Node; 12 | - state: State; 13 | - style?: StyleProp>; 14 | + children: React.ReactNode; 15 | + onLayout: (event: LayoutChangeEvent) => void; 16 | + animatedHeight: Animated.Node; 17 | + state: State; 18 | + style?: StyleProp>; 19 | }; 20 | -export declare function AnimatedSection({ children, onLayout, animatedHeight, state, style, }: Props): JSX.Element; 21 | +export declare function AnimatedSection({ 22 | + children, 23 | + onLayout, 24 | + animatedHeight, 25 | + state, 26 | + style, 27 | +}: Props): JSX.Element; 28 | export {}; 29 | diff --git a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/types.d.ts b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/types.d.ts 30 | index 039c025..3912f9e 100644 31 | --- a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/types.d.ts 32 | +++ b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/types.d.ts 33 | @@ -2,5 +2,8 @@ import type Animated from 'react-native-reanimated'; 34 | export declare type State = 'expanded' | 'collapsed'; 35 | export declare type Config = { 36 | duration?: number; 37 | - easing?: Animated.EasingFunction; 38 | + easing?: Animated.EasingNodeFunction; 39 | + state: string; 40 | + show: boolean | null | undefined; 41 | + unmountOnCollapse: boolean | null | undefined; 42 | }; 43 | diff --git a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/useCollapsible.d.ts b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/useCollapsible.d.ts 44 | index a76dd60..fa309f4 100644 45 | --- a/node_modules/reanimated-collapsible-helpers/lib/typescript/src/useCollapsible.d.ts 46 | +++ b/node_modules/reanimated-collapsible-helpers/lib/typescript/src/useCollapsible.d.ts 47 | @@ -2,9 +2,11 @@ import type { LayoutChangeEvent } from 'react-native'; 48 | import Animated from 'react-native-reanimated'; 49 | import type { State, Config } from './types'; 50 | export declare function useCollapsible(config?: Config): { 51 | - onLayout: (event: LayoutChangeEvent) => void; 52 | - onPress: () => void; 53 | - animatedHeight: Animated.Node; 54 | - height: number; 55 | - state: State; 56 | + onLayout: (event: LayoutChangeEvent) => void; 57 | + onPress: () => void; 58 | + animatedHeight: Animated.Node; 59 | + height: number; 60 | + state: State; 61 | + setMounted: (mounted: boolean) => void; 62 | + mounted: boolean; 63 | }; 64 | diff --git a/node_modules/reanimated-collapsible-helpers/src/reanimatedHelpers.ts b/node_modules/reanimated-collapsible-helpers/src/reanimatedHelpers.ts 65 | index b26a76e..b6a68cb 100644 66 | --- a/node_modules/reanimated-collapsible-helpers/src/reanimatedHelpers.ts 67 | +++ b/node_modules/reanimated-collapsible-helpers/src/reanimatedHelpers.ts 68 | @@ -1,22 +1,14 @@ 69 | -import Animated, { Easing } from 'react-native-reanimated'; 70 | +import Animated, { EasingNode } from 'react-native-reanimated'; 71 | 72 | -const { 73 | - Value, 74 | - set, 75 | - cond, 76 | - startClock, 77 | - clockRunning, 78 | - timing, 79 | - stopClock, 80 | - block, 81 | -} = Animated; 82 | +const { Value, set, cond, startClock, clockRunning, timing, stopClock, block } = 83 | + Animated; 84 | 85 | export function runTiming( 86 | clock: Animated.Clock, 87 | value: Animated.Value, 88 | dest: Animated.Value, 89 | duration: number = 250, 90 | - easing: Animated.EasingFunction = Easing.out(Easing.ease) 91 | + easing: Animated.EasingNodeFunction = EasingNode.out(EasingNode.ease) 92 | ) { 93 | const state = { 94 | finished: new Value(0), 95 | diff --git a/node_modules/reanimated-collapsible-helpers/src/types.ts b/node_modules/reanimated-collapsible-helpers/src/types.ts 96 | index 63710b0..84b6181 100644 97 | --- a/node_modules/reanimated-collapsible-helpers/src/types.ts 98 | +++ b/node_modules/reanimated-collapsible-helpers/src/types.ts 99 | @@ -4,5 +4,10 @@ export type State = 'expanded' | 'collapsed'; 100 | 101 | export type Config = { 102 | duration?: number; 103 | - easing?: Animated.EasingFunction; 104 | + easing?: Animated.EasingNodeFunction; 105 | + state: string; 106 | + show: boolean | null | undefined; 107 | + unmountOnCollapse: boolean | null | undefined; 108 | + setMounted: () => void; 109 | + mounted: boolean; 110 | }; 111 | diff --git a/node_modules/reanimated-collapsible-helpers/src/useCollapsible.ts b/node_modules/reanimated-collapsible-helpers/src/useCollapsible.ts 112 | index 2cea421..3f78337 100644 113 | --- a/node_modules/reanimated-collapsible-helpers/src/useCollapsible.ts 114 | +++ b/node_modules/reanimated-collapsible-helpers/src/useCollapsible.ts 115 | @@ -1,4 +1,4 @@ 116 | -import React from 'react'; 117 | +import React, { useCallback } from 'react'; 118 | import type { LayoutChangeEvent } from 'react-native'; 119 | import Animated from 'react-native-reanimated'; 120 | 121 | @@ -9,7 +9,9 @@ const { Clock, Value } = Animated; 122 | 123 | export function useCollapsible(config?: Config) { 124 | const [height, setHeight] = React.useState(0); 125 | - const [state, setState] = React.useState('collapsed'); 126 | + const [state, setState] = React.useState( 127 | + config?.state === 'expanded' ? 'expanded' : 'collapsed' 128 | + ); 129 | 130 | const { current: clock } = React.useRef(new Clock()); 131 | const { current: progress } = React.useRef(new Value(0)); 132 | @@ -18,11 +20,22 @@ export function useCollapsible(config?: Config) { 133 | runTiming(clock, progress, animation, config?.duration, config?.easing) 134 | ); 135 | 136 | + const [mounted, setMounted] = React.useState( 137 | + config?.state === 'expanded' ? true : false 138 | + ); 139 | + 140 | + const handleAnimationEnd = () => { 141 | + if (config?.unmountOnCollapse && !config?.show) setMounted(false); 142 | + }; 143 | + 144 | React.useEffect(() => { 145 | if (state === 'collapsed') { 146 | animation.setValue(0); 147 | + setMounted(false); 148 | + handleAnimationEnd(); 149 | } else { 150 | animation.setValue(height); 151 | + setMounted(true); 152 | } 153 | }, [state, height, animation]); 154 | 155 | @@ -47,5 +60,7 @@ export function useCollapsible(config?: Config) { 156 | animatedHeight, 157 | height, 158 | state, 159 | + mounted, 160 | + setMounted, 161 | }; 162 | } 163 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import React, {useCallback} from 'react'; 2 | import { 3 | Dimensions, 4 | FlatList, 5 | SafeAreaView, 6 | StyleSheet, 7 | View 8 | } from 'react-native'; 9 | import {getBottomSpace} from 'react-native-iphone-x-helper'; 10 | import {getLastChildCommentId, getLastChildCommentIdFromParent} from './utils'; 11 | import CollapsibleView from './components/CollapsibleView'; 12 | import Comment from './components/Comment'; 13 | import {comments} from './comments'; 14 | 15 | const dimensions = Dimensions.get('window'); 16 | 17 | const App = () => { 18 | const keyExtractor = useCallback(item => item.id, []); 19 | 20 | const renderItems = useCallback( 21 | ({item, index}: {item: any; index: number}) => { 22 | return ( 23 | <> 24 | {!item.parent_comment_id ? ( 25 | 0} 28 | index={index} 29 | isParent 30 | lastCommentParentId={getLastChildCommentIdFromParent(item)} 31 | lastCommentGrandId={getLastChildCommentId(item)} 32 | nested={0} 33 | isParentLast={false} 34 | // @ts-ignore 35 | isLast={item.id === comments[comments?.length - 1].id} 36 | parentCommentLength={0} 37 | totalChildren={item?.child_comments?.length || 0} 38 | /> 39 | ) : null} 40 | 41 | {item?.child_comments?.length > 0 ? ( 42 | comment.id === getLastChildCommentId(item) 50 | )} 51 | title={ 52 | item?.child_comments?.length === 1 53 | ? `show ${item?.child_comments?.length} reply` 54 | : `show ${item?.child_comments?.length} replies` 55 | } 56 | collapsedTitle={ 57 | item?.child_comments?.length === 1 58 | ? 'hide reply' 59 | : 'hide replies' 60 | } 61 | parentCommentLength={item?.child_comments?.length || 0} 62 | unmountOnCollapse> 63 | {item.child_comments.map((levelOneComment: any, idx: number) => { 64 | return ( 65 | 66 | 0} 69 | index={idx} 70 | key={item.id} 71 | lastCommentParentId={getLastChildCommentIdFromParent( 72 | item 73 | )} 74 | lastCommentGrandId={getLastChildCommentId(item)} 75 | nested={1} 76 | isParentLast={ 77 | levelOneComment.id === 78 | item.child_comments[item.child_comments.length - 1].id 79 | } 80 | isParent={levelOneComment?.child_comments?.length > 0} 81 | parentCommentLength={item?.child_comments?.length || 0} 82 | totalChildren={ 83 | levelOneComment?.child_comments?.length || 0 84 | } 85 | isLast={ 86 | levelOneComment.id === 87 | item.child_comments[item.child_comments.length - 1].id 88 | } 89 | /> 90 | {levelOneComment?.child_comments?.length > 0 ? ( 91 | 98 | comment.id === 99 | getLastChildCommentId(levelOneComment) 100 | )} 101 | title={ 102 | levelOneComment?.child_comments?.length === 1 103 | ? `show ${levelOneComment?.child_comments?.length} reply` 104 | : `show ${levelOneComment?.child_comments?.length} replies` 105 | } 106 | collapsedTitle={ 107 | levelOneComment?.child_comments?.length === 1 108 | ? 'hide reply' 109 | : 'hide replies' 110 | } 111 | isParentLast={ 112 | levelOneComment.id === 113 | item.child_comments[item.child_comments.length - 1].id 114 | } 115 | parentCommentLength={ 116 | levelOneComment.child_comments.length 117 | } 118 | titleStyle={styles.showMoreCommentsTwo} 119 | unmountOnCollapse> 120 | {levelOneComment.child_comments.map( 121 | (levelTwoComment: any, idxTwo: number) => { 122 | return ( 123 | 124 | 155 | 156 | ); 157 | } 158 | )} 159 | 160 | ) : null} 161 | 162 | ); 163 | })} 164 | 165 | ) : null} 166 | 167 | ); 168 | }, 169 | [comments, getLastChildCommentId, getLastChildCommentIdFromParent] 170 | ); 171 | 172 | return ( 173 | 174 | 175 | 184 | 185 | 186 | ); 187 | }; 188 | 189 | const styles = StyleSheet.create({ 190 | sectionContainer: { 191 | marginTop: 32, 192 | paddingHorizontal: 24 193 | }, 194 | sectionTitle: { 195 | fontSize: 24, 196 | fontWeight: '600' 197 | }, 198 | sectionDescription: { 199 | marginTop: 8, 200 | fontSize: 18, 201 | fontWeight: '400' 202 | }, 203 | highlight: { 204 | fontWeight: '700' 205 | }, 206 | flatList: { 207 | flex: 1, 208 | marginBottom: getBottomSpace() + 60, 209 | minHeight: dimensions.height - (getBottomSpace() + 160) 210 | }, 211 | flatListWrapper: { 212 | flex: 1, 213 | flexGrow: 1 214 | }, 215 | arrow: { 216 | size: 24, 217 | thickness: 2, 218 | color: 'grey' 219 | }, 220 | showMoreComments: { 221 | marginLeft: 12, 222 | color: 'grey' 223 | }, 224 | showMoreCommentsTwo: { 225 | marginLeft: 12, 226 | marginTop: 8, 227 | color: 'grey' 228 | } 229 | }); 230 | 231 | export default App; 232 | -------------------------------------------------------------------------------- /src/comments.ts: -------------------------------------------------------------------------------- 1 | export const comments = [ 2 | { 3 | __typename: 'comment', 4 | id: 'f7711b6c-2906-4b75-a1d7-c05e93a84b09', 5 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 6 | edited_at: null, 7 | comment_liked: false, 8 | content: 'Testing nested comments!', 9 | created_at: '2022-03-25T10:51:02.305885+00:00', 10 | 11 | parent_comment_id: null, 12 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 13 | post: { 14 | __typename: 'post', 15 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 16 | }, 17 | parent_comment: null, 18 | author_profile: { 19 | __typename: 'profile', 20 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 21 | first_name: 'Stathis', 22 | is_online: false, 23 | is_staff: false, 24 | latest_login: '2022-03-25T09:19:14.847+00:00', 25 | show_online_status: true, 26 | profile_images: [ 27 | { 28 | __typename: 'profile_image', 29 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 30 | avatar: true, 31 | file_name: 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 32 | height: 2048, 33 | order: 0, 34 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 35 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 36 | width: 1151 37 | } 38 | ] 39 | }, 40 | comment_images: [], 41 | total_comment_likes: 0, 42 | comment_likes_aggregate: { 43 | __typename: 'comment_like_aggregate', 44 | nodes: [] 45 | }, 46 | child_comments: [ 47 | { 48 | __typename: 'comment', 49 | id: '971a873d-4d45-40c9-9568-48e5b7f4837d', 50 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 51 | author_profile: { 52 | __typename: 'profile', 53 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 54 | first_name: 'Stathis', 55 | is_online: false, 56 | is_staff: false, 57 | latest_login: '2022-03-25T09:19:14.847+00:00', 58 | show_online_status: true, 59 | profile_images: [ 60 | { 61 | __typename: 'profile_image', 62 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 63 | avatar: true, 64 | file_name: 65 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 66 | height: 2048, 67 | order: 0, 68 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 69 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 70 | width: 1151 71 | } 72 | ] 73 | }, 74 | comment_images: [], 75 | comment_liked: false, 76 | comment_likes_aggregate: { 77 | __typename: 'comment_like_aggregate', 78 | nodes: [] 79 | }, 80 | content: 'Hello there', 81 | created_at: '2022-03-25T10:51:08.107302+00:00', 82 | edited_at: null, 83 | 84 | parent_comment_id: 'f7711b6c-2906-4b75-a1d7-c05e93a84b09', 85 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 86 | total_comment_likes: 0, 87 | post: { 88 | __typename: 'post', 89 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 90 | }, 91 | parent_comment: { 92 | __typename: 'comment', 93 | id: 'f7711b6c-2906-4b75-a1d7-c05e93a84b09' 94 | }, 95 | child_comments: [] 96 | } 97 | ] 98 | }, 99 | { 100 | __typename: 'comment', 101 | id: '59c89a27-7cf9-4bd9-a499-06ed5f754161', 102 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 103 | edited_at: null, 104 | comment_liked: false, 105 | content: 'I hope everything is fine', 106 | created_at: '2022-03-22T18:41:32.728687+00:00', 107 | 108 | parent_comment_id: null, 109 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 110 | post: { 111 | __typename: 'post', 112 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 113 | }, 114 | parent_comment: null, 115 | author_profile: { 116 | __typename: 'profile', 117 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 118 | first_name: 'Stathis', 119 | is_online: false, 120 | is_staff: false, 121 | latest_login: '2022-03-25T09:19:14.847+00:00', 122 | show_online_status: true, 123 | profile_images: [ 124 | { 125 | __typename: 'profile_image', 126 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 127 | avatar: true, 128 | file_name: 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 129 | height: 2048, 130 | order: 0, 131 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 132 | 133 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 134 | width: 1151 135 | } 136 | ] 137 | }, 138 | comment_images: [], 139 | total_comment_likes: 0, 140 | comment_likes_aggregate: { 141 | __typename: 'comment_like_aggregate', 142 | nodes: [] 143 | }, 144 | child_comments: [ 145 | { 146 | __typename: 'comment', 147 | id: 'c0421b09-2d05-4aec-8a56-e1b4089988ab', 148 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 149 | author_profile: { 150 | __typename: 'profile', 151 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 152 | first_name: 'Stathis', 153 | is_online: false, 154 | is_staff: false, 155 | latest_login: '2022-03-25T09:19:14.847+00:00', 156 | show_online_status: true, 157 | profile_images: [ 158 | { 159 | __typename: 'profile_image', 160 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 161 | avatar: true, 162 | file_name: 163 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 164 | height: 2048, 165 | order: 0, 166 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 167 | 168 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 169 | width: 1151 170 | } 171 | ] 172 | }, 173 | comment_images: [], 174 | comment_liked: false, 175 | comment_likes_aggregate: { 176 | __typename: 'comment_like_aggregate', 177 | nodes: [] 178 | }, 179 | content: 'This is nice commenting tree!', 180 | created_at: '2022-03-22T18:41:57.701034+00:00', 181 | edited_at: null, 182 | 183 | parent_comment_id: '59c89a27-7cf9-4bd9-a499-06ed5f754161', 184 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 185 | total_comment_likes: 0, 186 | post: { 187 | __typename: 'post', 188 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 189 | }, 190 | parent_comment: { 191 | __typename: 'comment', 192 | id: '59c89a27-7cf9-4bd9-a499-06ed5f754161' 193 | }, 194 | child_comments: [] 195 | }, 196 | { 197 | __typename: 'comment', 198 | id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c', 199 | author_id: '7c2APxuPmdbny7W63078ooypNZx2', 200 | author_profile: { 201 | __typename: 'profile', 202 | id: '7c2APxuPmdbny7W63078ooypNZx2', 203 | first_name: 'Pete', 204 | is_online: false, 205 | is_staff: false, 206 | latest_login: '2022-03-25T10:41:34.645+00:00', 207 | show_online_status: true, 208 | profile_images: [ 209 | { 210 | __typename: 'profile_image', 211 | id: '044c44f4-a42f-4f22-b2a8-fa3e0d559ea9', 212 | avatar: true, 213 | file_name: 214 | 'gsgva--Bpwlq_7E95074F-9993-4255-BE30-EA7A36E06F31.jpg', 215 | height: 2048, 216 | order: 0, 217 | profile_id: '7c2APxuPmdbny7W63078ooypNZx2', 218 | 219 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267011', 220 | width: 1750 221 | } 222 | ] 223 | }, 224 | comment_images: [], 225 | comment_liked: false, 226 | comment_likes_aggregate: { 227 | __typename: 'comment_like_aggregate', 228 | nodes: [] 229 | }, 230 | content: 'Doing well', 231 | created_at: '2022-03-23T11:23:31.176812+00:00', 232 | edited_at: null, 233 | 234 | parent_comment_id: '59c89a27-7cf9-4bd9-a499-06ed5f754161', 235 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 236 | total_comment_likes: 0, 237 | post: { 238 | __typename: 'post', 239 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 240 | }, 241 | parent_comment: { 242 | __typename: 'comment', 243 | id: '59c89a27-7cf9-4bd9-a499-06ed5f754161' 244 | }, 245 | child_comments: [ 246 | { 247 | __typename: 'comment', 248 | id: '24928489-f584-4c0c-81c1-a470ead5a291', 249 | author_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 250 | author_profile: { 251 | __typename: 'profile', 252 | id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 253 | first_name: 'Team Four', 254 | is_online: false, 255 | is_staff: false, 256 | latest_login: '2022-03-25T09:19:16.806+00:00', 257 | show_online_status: true, 258 | profile_images: [ 259 | { 260 | __typename: 'profile_image', 261 | id: 'e0b577b4-6656-4dee-87c1-0005b4c7049c', 262 | avatar: true, 263 | file_name: 264 | 'eqYoHHDkPjwr_88EE2A5F-E08C-457D-9F41-2C27A867EF5A.jpg', 265 | height: 2048, 266 | order: 0, 267 | profile_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 268 | 269 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267022', 270 | width: 1154 271 | } 272 | ] 273 | }, 274 | comment_images: [], 275 | comment_liked: false, 276 | comment_likes_aggregate: { 277 | __typename: 'comment_like_aggregate', 278 | nodes: [] 279 | }, 280 | content: 'Hey', 281 | created_at: '2022-03-24T12:15:31.319729+00:00', 282 | edited_at: null, 283 | 284 | parent_comment_id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c', 285 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 286 | total_comment_likes: 0, 287 | post: { 288 | __typename: 'post', 289 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 290 | }, 291 | parent_comment: { 292 | __typename: 'comment', 293 | id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c' 294 | } 295 | }, 296 | { 297 | __typename: 'comment', 298 | id: '1d784251-3ae3-491c-9b92-a8533b3e624f', 299 | author_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 300 | author_profile: { 301 | __typename: 'profile', 302 | id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 303 | first_name: 'Team Four', 304 | is_online: false, 305 | is_staff: false, 306 | latest_login: '2022-03-25T09:19:16.806+00:00', 307 | show_online_status: true, 308 | profile_images: [ 309 | { 310 | __typename: 'profile_image', 311 | id: 'e0b577b4-6656-4dee-87c1-0005b4c7049c', 312 | avatar: true, 313 | file_name: 314 | 'eqYoHHDkPjwr_88EE2A5F-E08C-457D-9F41-2C27A867EF5A.jpg', 315 | height: 2048, 316 | order: 0, 317 | profile_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 318 | 319 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267022', 320 | width: 1154 321 | } 322 | ] 323 | }, 324 | comment_images: [], 325 | comment_liked: false, 326 | comment_likes_aggregate: { 327 | __typename: 'comment_like_aggregate', 328 | nodes: [] 329 | }, 330 | content: 'Life as a react native developer is wonderful!', 331 | created_at: '2022-03-24T12:15:41.92462+00:00', 332 | edited_at: null, 333 | 334 | parent_comment_id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c', 335 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 336 | total_comment_likes: 0, 337 | post: { 338 | __typename: 'post', 339 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 340 | }, 341 | parent_comment: { 342 | __typename: 'comment', 343 | id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c' 344 | } 345 | }, 346 | { 347 | __typename: 'comment', 348 | id: '14e7aed5-2022-4a87-8a38-0d4569350613', 349 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 350 | author_profile: { 351 | __typename: 'profile', 352 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 353 | first_name: 'Stathis', 354 | is_online: false, 355 | is_staff: false, 356 | latest_login: '2022-03-25T09:19:14.847+00:00', 357 | show_online_status: true, 358 | profile_images: [ 359 | { 360 | __typename: 'profile_image', 361 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 362 | avatar: true, 363 | file_name: 364 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 365 | height: 2048, 366 | order: 0, 367 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 368 | 369 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 370 | width: 1151 371 | } 372 | ] 373 | }, 374 | comment_images: [], 375 | comment_liked: false, 376 | comment_likes_aggregate: { 377 | __typename: 'comment_like_aggregate', 378 | nodes: [] 379 | }, 380 | content: 'Hahaha! true story', 381 | created_at: '2022-03-25T10:16:47.489903+00:00', 382 | edited_at: null, 383 | 384 | parent_comment_id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c', 385 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 386 | total_comment_likes: 0, 387 | post: { 388 | __typename: 'post', 389 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 390 | }, 391 | parent_comment: { 392 | __typename: 'comment', 393 | id: '0d583b8e-2874-420a-8e0b-d407cbce2b8c' 394 | } 395 | } 396 | ] 397 | } 398 | ] 399 | }, 400 | { 401 | __typename: 'comment', 402 | id: '4298fbb4-6f93-4a08-b701-d84a52f673b9', 403 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 404 | edited_at: null, 405 | comment_liked: false, 406 | content: 'But why?', 407 | created_at: '2022-03-22T18:36:07.867808+00:00', 408 | 409 | parent_comment_id: null, 410 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 411 | post: { 412 | __typename: 'post', 413 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 414 | }, 415 | parent_comment: null, 416 | author_profile: { 417 | __typename: 'profile', 418 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 419 | first_name: 'Stathis', 420 | is_online: false, 421 | is_staff: false, 422 | latest_login: '2022-03-25T09:19:14.847+00:00', 423 | show_online_status: true, 424 | profile_images: [ 425 | { 426 | __typename: 'profile_image', 427 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 428 | avatar: true, 429 | file_name: 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 430 | height: 2048, 431 | order: 0, 432 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 433 | 434 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 435 | width: 1151 436 | } 437 | ] 438 | }, 439 | comment_images: [], 440 | total_comment_likes: 0, 441 | comment_likes_aggregate: { 442 | __typename: 'comment_like_aggregate', 443 | nodes: [] 444 | }, 445 | child_comments: [ 446 | { 447 | __typename: 'comment', 448 | id: '12f6f3b3-3a5c-49fc-83ba-3e5607add57d', 449 | author_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 450 | author_profile: { 451 | __typename: 'profile', 452 | id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 453 | first_name: 'Team Four', 454 | is_online: false, 455 | is_staff: false, 456 | latest_login: '2022-03-25T09:19:16.806+00:00', 457 | show_online_status: true, 458 | profile_images: [ 459 | { 460 | __typename: 'profile_image', 461 | id: 'e0b577b4-6656-4dee-87c1-0005b4c7049c', 462 | avatar: true, 463 | file_name: 464 | 'eqYoHHDkPjwr_88EE2A5F-E08C-457D-9F41-2C27A867EF5A.jpg', 465 | height: 2048, 466 | order: 0, 467 | profile_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 468 | 469 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267022', 470 | width: 1154 471 | } 472 | ] 473 | }, 474 | comment_images: [], 475 | comment_liked: false, 476 | comment_likes_aggregate: { 477 | __typename: 'comment_like_aggregate', 478 | nodes: [] 479 | }, 480 | content: 'This is a nice comment, thank you!', 481 | created_at: '2022-03-24T13:00:53.537299+00:00', 482 | edited_at: null, 483 | 484 | parent_comment_id: '4298fbb4-6f93-4a08-b701-d84a52f673b9', 485 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 486 | total_comment_likes: 0, 487 | post: { 488 | __typename: 'post', 489 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 490 | }, 491 | parent_comment: { 492 | __typename: 'comment', 493 | id: '4298fbb4-6f93-4a08-b701-d84a52f673b9' 494 | }, 495 | child_comments: [] 496 | } 497 | ] 498 | }, 499 | { 500 | __typename: 'comment', 501 | id: 'ba1ff72d-d0d7-4f0e-b9fa-fbd9c8c1901c', 502 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 503 | edited_at: null, 504 | comment_liked: false, 505 | content: 'Hey Kath!', 506 | created_at: '2022-03-22T18:34:17.216374+00:00', 507 | 508 | parent_comment_id: null, 509 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 510 | post: { 511 | __typename: 'post', 512 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 513 | }, 514 | parent_comment: null, 515 | author_profile: { 516 | __typename: 'profile', 517 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 518 | first_name: 'Stathis', 519 | is_online: false, 520 | is_staff: false, 521 | latest_login: '2022-03-25T09:19:14.847+00:00', 522 | show_online_status: true, 523 | profile_images: [ 524 | { 525 | __typename: 'profile_image', 526 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 527 | avatar: true, 528 | file_name: 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 529 | height: 2048, 530 | order: 0, 531 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 532 | 533 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 534 | width: 1151 535 | } 536 | ] 537 | }, 538 | comment_images: [], 539 | total_comment_likes: 0, 540 | comment_likes_aggregate: { 541 | __typename: 'comment_like_aggregate', 542 | nodes: [] 543 | }, 544 | child_comments: [ 545 | { 546 | __typename: 'comment', 547 | id: '5fbbf473-6d84-424f-a6d0-113438037fc2', 548 | author_id: '7c2APxuPmdbny7W63078ooypNZx2', 549 | author_profile: { 550 | __typename: 'profile', 551 | id: '7c2APxuPmdbny7W63078ooypNZx2', 552 | first_name: 'Pete', 553 | is_online: false, 554 | is_staff: false, 555 | latest_login: '2022-03-25T10:41:34.645+00:00', 556 | show_online_status: true, 557 | profile_images: [ 558 | { 559 | __typename: 'profile_image', 560 | id: '044c44f4-a42f-4f22-b2a8-fa3e0d559ea9', 561 | avatar: true, 562 | file_name: 563 | 'gsgva--Bpwlq_7E95074F-9993-4255-BE30-EA7A36E06F31.jpg', 564 | height: 2048, 565 | order: 0, 566 | profile_id: '7c2APxuPmdbny7W63078ooypNZx2', 567 | 568 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267011', 569 | width: 1750 570 | } 571 | ] 572 | }, 573 | comment_images: [], 574 | comment_liked: false, 575 | comment_likes_aggregate: { 576 | __typename: 'comment_like_aggregate', 577 | nodes: [] 578 | }, 579 | content: 'Hi there!', 580 | created_at: '2022-03-22T18:34:27.94634+00:00', 581 | edited_at: null, 582 | 583 | parent_comment_id: 'ba1ff72d-d0d7-4f0e-b9fa-fbd9c8c1901c', 584 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 585 | total_comment_likes: 0, 586 | post: { 587 | __typename: 'post', 588 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 589 | }, 590 | parent_comment: { 591 | __typename: 'comment', 592 | id: 'ba1ff72d-d0d7-4f0e-b9fa-fbd9c8c1901c' 593 | }, 594 | child_comments: [ 595 | { 596 | __typename: 'comment', 597 | id: '3c45b387-b8b0-4f4b-9846-5f541dcefdcc', 598 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 599 | author_profile: { 600 | __typename: 'profile', 601 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 602 | first_name: 'Stathis', 603 | is_online: false, 604 | is_staff: false, 605 | latest_login: '2022-03-25T09:19:14.847+00:00', 606 | show_online_status: true, 607 | profile_images: [ 608 | { 609 | __typename: 'profile_image', 610 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 611 | avatar: true, 612 | file_name: 613 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 614 | height: 2048, 615 | order: 0, 616 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 617 | 618 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 619 | width: 1151 620 | } 621 | ] 622 | }, 623 | comment_images: [], 624 | comment_liked: false, 625 | comment_likes_aggregate: { 626 | __typename: 'comment_like_aggregate', 627 | nodes: [] 628 | }, 629 | content: 'How are you?', 630 | created_at: '2022-03-22T18:34:43.792907+00:00', 631 | edited_at: null, 632 | 633 | parent_comment_id: '5fbbf473-6d84-424f-a6d0-113438037fc2', 634 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 635 | total_comment_likes: 0, 636 | post: { 637 | __typename: 'post', 638 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 639 | }, 640 | parent_comment: { 641 | __typename: 'comment', 642 | id: '5fbbf473-6d84-424f-a6d0-113438037fc2' 643 | } 644 | }, 645 | { 646 | __typename: 'comment', 647 | id: '87f0c569-0cdd-43c8-b75f-9a16ca76aef0', 648 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 649 | author_profile: { 650 | __typename: 'profile', 651 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 652 | first_name: 'Stathis', 653 | is_online: false, 654 | is_staff: false, 655 | latest_login: '2022-03-25T09:19:14.847+00:00', 656 | show_online_status: true, 657 | profile_images: [ 658 | { 659 | __typename: 'profile_image', 660 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 661 | avatar: true, 662 | file_name: 663 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 664 | height: 2048, 665 | order: 0, 666 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 667 | 668 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 669 | width: 1151 670 | } 671 | ] 672 | }, 673 | comment_images: [], 674 | comment_liked: false, 675 | comment_likes_aggregate: { 676 | __typename: 'comment_like_aggregate', 677 | nodes: [] 678 | }, 679 | content: 'Is everything ok?', 680 | created_at: '2022-03-22T18:35:13.314447+00:00', 681 | edited_at: null, 682 | 683 | parent_comment_id: '5fbbf473-6d84-424f-a6d0-113438037fc2', 684 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 685 | total_comment_likes: 0, 686 | post: { 687 | __typename: 'post', 688 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 689 | }, 690 | parent_comment: { 691 | __typename: 'comment', 692 | id: '5fbbf473-6d84-424f-a6d0-113438037fc2' 693 | } 694 | }, 695 | { 696 | __typename: 'comment', 697 | id: 'a9135114-b95b-4111-941b-181de27a5adf', 698 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 699 | author_profile: { 700 | __typename: 'profile', 701 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 702 | first_name: 'Stathis', 703 | is_online: false, 704 | is_staff: false, 705 | latest_login: '2022-03-25T09:19:14.847+00:00', 706 | show_online_status: true, 707 | profile_images: [ 708 | { 709 | __typename: 'profile_image', 710 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 711 | avatar: true, 712 | file_name: 713 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 714 | height: 2048, 715 | order: 0, 716 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 717 | 718 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 719 | width: 1151 720 | } 721 | ] 722 | }, 723 | comment_images: [], 724 | comment_liked: false, 725 | comment_likes_aggregate: { 726 | __typename: 'comment_like_aggregate', 727 | nodes: [] 728 | }, 729 | content: 'Do you get it??', 730 | created_at: '2022-03-22T18:37:16.416902+00:00', 731 | edited_at: null, 732 | 733 | parent_comment_id: '5fbbf473-6d84-424f-a6d0-113438037fc2', 734 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 735 | total_comment_likes: 0, 736 | post: { 737 | __typename: 'post', 738 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 739 | }, 740 | parent_comment: { 741 | __typename: 'comment', 742 | id: '5fbbf473-6d84-424f-a6d0-113438037fc2' 743 | } 744 | }, 745 | { 746 | __typename: 'comment', 747 | id: 'a2ca98e4-f718-4ef0-833f-d5b2029ce869', 748 | author_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 749 | author_profile: { 750 | __typename: 'profile', 751 | id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 752 | first_name: 'Stathis', 753 | is_online: false, 754 | is_staff: false, 755 | latest_login: '2022-03-25T09:19:14.847+00:00', 756 | show_online_status: true, 757 | profile_images: [ 758 | { 759 | __typename: 'profile_image', 760 | id: '8607c2ba-3466-42f5-b2c9-f3b47420c388', 761 | avatar: true, 762 | file_name: 763 | 'NAUfWB53YkjS_9BB02B6B-3929-4B59-9166-57A31DCF3C59.jpg', 764 | height: 2048, 765 | order: 0, 766 | profile_id: 'o5Fn3gzBITh4XgfYi65iNxMJyUH2', 767 | 768 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267043', 769 | width: 1151 770 | } 771 | ] 772 | }, 773 | comment_images: [], 774 | comment_liked: false, 775 | comment_likes_aggregate: { 776 | __typename: 'comment_like_aggregate', 777 | nodes: [] 778 | }, 779 | content: 780 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor lacus, lacinia eget cursus vitae, maximus ut felis. Vivamus maximus orci et erat dignissim, in interdum risus fringilla. Etiam cursus nisl sed nisl feugiat porta. Praesent et purus purus. Donec sagittis sit amet purus in ultricies. Ut eget diam sem. In finibus convallis ex, imperdiet maximus tortor tristique vitae. Aliquam erat volutpat. Praesent tincidunt elit vitae ligula tristique, at pretium turpis efficitur. Fusce porta blandit lacus, eu malesuada quam faucibus at. Proin sollicitudin nisi ut risus sagittis, accumsan pharetra lorem dignissim. Maecenas in dolor vitae dolor fermentum porta malesuada sit amet velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n' + 781 | '\n' + 782 | 'Sed vitae tortor condimentum, semper tortor eu, vehicula lacus. Integer nec egestas leo, vel lacinia odio. Curabitur sit amet dolor finibus turpis sodales feugiat vitae a ex. Donec vel nibh eu tortor tincidunt aliquam in non arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla facilisi. Pellentesque pellentesque elit nibh, et congue ipsum molestie sit amet. Pellentesque dictum, dui vitae consequat aliquam, lorem nibh efficitur tortor, a tincidunt sapien lectus id enim. Morbi feugiat odio ut elementum sagittis. Cras quis velit vel diam aliquam laoreet aliquam eget eros. Sed neque nunc, venenatis et dictum nec, suscipit id justo. Mauris purus quam, tempor malesuada lacus ut, consectetur sollicitudin nibh.\n' + 783 | '\n' + 784 | 'Fusce fringilla tempor purus, sit amet rutrum mi gravida vitae. Nullam malesuada urna augue, non vehicula est convallis sit amet. Vivamus rutrum porta odio, a congue risus porta vel. Aenean efficitur dignissim accumsan. Suspendisse accumsan nibh dui, et aliquam felis vulputate et. Pellentesque sagittis ante turpis, id cursus lorem molestie nec. Aliquam sit amet neque in metus mollis convallis vehicula at velit.\n' + 785 | '\n' + 786 | 'Mauris quis faucibus arcu. Vivamus maximus turpis quis est cursus fermentum. Cras auctor mi ac sem faucibus laoreet. Pellentesque eget ipsum a neque maximus cursus vitae ac nunc. Cras nunc erat, sagittis in accumsan at, euismod et ante. Suspendisse ex risus, sollicitudin nec hendrerit in, cursus ac nibh. Cras dictum eget leo vitae tristique. Nunc ut odio finibus, luctus neque at, dictum ante. Donec ante risus, iaculis ac nisi ut, semper tempor sem. Aliquam erat volutpat.\n' + 787 | '\n' + 788 | 'Proin in suscipit tortor, vel semper ipsum. Aenean sit amet pretium sem, eget fermentum dolor. Etiam fringilla tristique nunc eget lobortis. Duis lacinia, sapien eget luctus lobortis, mauris mi ullamcorper lectus, varius tempor nunc velit quis purus. Proin erat tortor, ornare in ultrices ut, mollis a tortor. Proin sit amet arcu et arcu placerat sollicitudin vitae id tellus. Maecenas et purus ut elit molestie elementum in eget nisi. Suspendisse maximus non libero sed sodales.\n' + 789 | '\n' + 790 | 'Mauris dignissim ut turpis et molestie. Nullam in massa fringilla, ultricies tortor nec, accumsan ante. Duis id ex eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed iaculis dignissim sem et suscipit. Donec eu nibh urna. Aenean vitae sem ligula. Vestibulum volutpat felis id augue tempor, eu sollicitudin urna lobortis. Fusce vel porttitor dui.\n' + 791 | '\n' + 792 | 'Maecenas sed nulla urna. Nam porttitor ullamcorper mi, fermentum feugiat velit viverra sed. Vivamus volutpat nisl sed laoreet lacinia. Quisque accumsan dolor mi, at aliquet leo luctus vitae. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas vehicula tempor efficitur. Phasellus nisl urna, vestibulum ultricies arcu at, venenatis efficitur ante. Vivamus augue enim, sagittis et neque non, bibendum fringilla dui. Sed tincidunt ipsum a eleifend laoreet.\n' + 793 | '\n' + 794 | 'Nulla nulla elit, elementum vel urna quis, vulputate porttitor libero. Aliquam consequat dui vel libero dictum hendrerit. Fusce eu nulla hendrerit, porta ipsum venenatis, congue eros. Aenean dignissim eu erat tincidunt elementum. Nulla feugiat eros sed ex imperdiet sollicitudin. Proin dolor nulla, pretium ut imperdiet consequat, posuere eget felis. Donec posuere, enim nec convallis tincidunt, nisi magna ornare libero, eget volutpat eros nisl quis nunc. Nullam accumsan odio non felis rutrum, eu sollicitudin tortor rutrum. Fusce blandit sodales nisl ut ullamcorper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Fusce et libero in nunc suscipit pellentesque a eget nibh. Nulla dictum lectus quis commodo lacinia. Ut vestibulum ultrices consectetur. Curabitur at rutrum nisi, quis convallis sapien.\n' + 795 | '\n' + 796 | 'Mauris eget mollis massa, quis rhoncus nibh. Aliquam dapibus fringilla sollicitudin. Sed maximus ex vel est commodo, lobortis euismod erat scelerisque. Morbi ornare commodo nisl, quis dignissim lorem gravida rhoncus. Praesent vel libero tincidunt, gravida ante vitae, feugiat lorem. Vivamus sit amet lectus non nisl lacinia finibus. Vestibulum imperdiet accumsan odio. Proin a est eu libero iaculis mattis. Vestibulum ut ultrices mi, non pharetra eros. Vestibulum sit amet sagittis leo, et dignissim odio.\n' + 797 | '\n' + 798 | 'Suspendisse at nulla dui. Pellentesque eu elit condimentum, scelerisque sapien a, vestibulum mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam tristique eros erat, mollis sagittis mauris cursus hendrerit. Suspendisse potenti. Donec pulvinar nibh a dui interdum rhoncus. Nulla arcu augue, interdum ac diam ac, scelerisque finibus nisi. In consequat vestibulum dapibus. Nulla facilisi. Sed ac urna risus.\n' + 799 | '\n' + 800 | 'In ut placerat risus. Donec eget laoreet mi. Nulla sed imperdiet leo, tincidunt vestibulum est. Integer in felis justo. Quisque consequat placerat eleifend. Phasellus suscipit sit amet mi at efficitur. Phasellus faucibus sollicitudin fringilla. Phasellus nulla nibh, tempus non orci sed, pharetra vestibulum lacus. Curabitur non placerat neque. Aenean interdum tortor eu imperdiet ultrices.\n' + 801 | '\n' + 802 | 'Morbi ex velit, ultricies varius iaculis ut, efficitur at enim. Proin lectus urna, bibendum et metus ac, rhoncus imperdiet ligula. Suspendisse eget eros ornare, dictum enim eget, tincidunt ante. Nunc facilisis felis at mauris tempus, vel posuere lorem sollicitudin. Pellentesque tincidunt vulputate ultrices. Donec laoreet in nibh a feugiat. Maecenas dapibus sapien maximus magna porttitor, id imperdiet magna pretium. Aenean condimentum, leo vel luctus gravida, libero ligula consequat elit, ac mattis quam augue eu ex. Ut eu libero et nisl hendrerit pharetra. Phasellus fermentum ut odio at efficitur. Quisque nulla sem, mattis eu enim sit amet, placerat hendrerit sem. Nunc tempus vitae nisi id facilisis. Donec et malesuada sem. Nam tincidunt mi in dui dictum pretium. Duis ullamcorper et massa sit amet aliquam. Quisque sit amet tortor rhoncus, porta dolor non, commodo ex.\n' + 803 | '\n' + 804 | 'Phasellus a lacus eget risus auctor congue. Vestibulum varius luctus augue. Proin interdum, risus condimentum tempus scelerisque, leo risus vehicula lacus, quis feugiat orci nunc eu tellus. Aliquam ut dui mi. Phasellus orci velit, viverra nec commodo sit amet, varius id libero. Aenean justo enim, ultrices ac eleifend quis, luctus at quam. Aenean facilisis mauris vitae commodo viverra. Mauris finibus purus eu erat lobortis tincidunt. Vestibulum dignissim quam sit amet placerat commodo.\n' + 805 | '\n' + 806 | 'Donec tristique quis justo nec fringilla. Nullam pulvinar arcu et cursus gravida. Fusce fringilla quam ut quam ullamcorper, eu pretium mauris elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec malesuada commodo lorem in sollicitudin. Pellentesque suscipit gravida sagittis. Aenean vitae erat iaculis metus tristique tempus. Sed interdum nulla a est tincidunt lobortis. Mauris pellentesque eleifend dui, ut rutrum purus porta malesuada. Quisque non efficitur ligula. Aliquam id hendrerit felis.\n' + 807 | '\n' + 808 | 'Integer a commodo felis, a ullamcorper dolor. Sed id bibendum purus, eu imperdiet justo. Mauris in mi massa. Curabitur non velit mi. Mauris massa ex, fringilla viverra sem nec, tincidunt semper purus. Nulla semper risus nec sapien placerat blandit a sit amet nibh. Sed mi lacus, fermentum sed erat ac, dictum imperdiet nisi.\n' + 809 | '\n' + 810 | 'Aliquam pulvinar dignissim mi, id fermentum ligula efficitur non. Donec sagittis viverra convallis. Ut bibendum libero non congue fringilla. Etiam vulputate, nulla et efficitur fringilla, turpis eros tincidunt nisl, facilisis pellentesque lacus elit id orci. Vestibulum pretium augue eget tellus pharetra eleifend. Proin vestibulum, leo quis sagittis sodales, nunc nunc mattis sapien, vel venenatis neque mi eget quam. Duis facilisis est in sollicitudin suscipit. Donec non nulla at velit lobortis fringilla at et augue. Sed ligula enim, imperdiet vel sem eget, auctor sollicitudin erat. Aliquam tincidunt, odio quis luctus euismod, eros felis ullamcorper felis, nec malesuada dui turpis quis nulla. Aenean commodo diam mollis nisi varius dapibus. Fusce id tellus interdum, sollicitudin purus a, viverra sapien. Cras ipsum velit, efficitur varius tortor a, dignissim accumsan quam. Integer in eros quis metus mollis ultrices non sed magna. Suspendisse commodo ex in nisi consequat mollis.\n' + 811 | '\n' + 812 | 'Ut tempor libero egestas imperdiet eleifend. Etiam volutpat neque vitae leo sollicitudin varius. Vivamus laoreet in velit id ornare. Praesent non odio ante. Quisque ut commodo mi. Aenean euismod nisi at quam ullamcorper efficitur. Quisque nec sapien ante. Quisque at risus dapibus, sodales augue id, dapibus est. Quisque commodo est nec nulla gravida dignissim. Sed cursus urna justo, ut sagittis arcu pharetra vitae. Vestibulum posuere dui nec ullamcorper luctus. Mauris interdum neque tortor, id viverra mauris rutrum vel. Ut accumsan efficitur urna, ut sollicitudin est ullamcorper nec. Sed dictum pulvinar magna sed mattis. Donec sed elementum sapien, in mattis tortor. Etiam bibendum ex ac metus sodales tempor.\n' + 813 | '\n' + 814 | 'Etiam tincidunt, orci ac sagittis hendrerit, diam tortor eleifend dolor, quis sollicitudin metus enim a eros. Donec laoreet turpis in leo consequat porttitor. Mauris faucibus dictum dolor, at varius augue malesuada at. Suspendisse vehicula lacus felis, ut viverra eros scelerisque in. Vestibulum vitae leo nec nibh blandit auctor vel sit amet lorem. Suspendisse ac congue purus, eget molestie ante. Maecenas imperdiet nibh ut pharetra rutrum. Aliquam ligula orci, volutpat a egestas eget, finibus sed purus. Donec vitae lobortis eros, sit amet porttitor mauris. Suspendisse placerat diam vestibulum varius vehicula. Proin ultrices egestas interdum. Etiam orci orci, dapibus ac ullamcorper at, faucibus ac ex. Nulla ac libero efficitur urna porta pellentesque in in lectus. Morbi vehicula convallis efficitur. Mauris viverra dui tempor, rhoncus arcu non, dictum enim.\n' + 815 | '\n' + 816 | 'Sed et tempor risus. Aliquam erat volutpat. Maecenas vel lacus at lacus tincidunt scelerisque et a sem. Vivamus efficitur hendrerit elit sit amet luctus. Nunc vel tincidunt sem, in volutpat augue. Fusce vitae ex sed magna euismod tristique porta eu metus. Nulla facilisi. Integer iaculis, dolor eu venenatis mollis, dui leo pretium mauris, vel pretium nibh tellus at lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed et lacinia magna. Ut in ligula eu sapien volutpat euismod quis ut velit. Aenean vel purus et tortor imperdiet lacinia. Ut quam justo, ornare et dictum a, facilisis maximus felis.', 817 | created_at: '2022-03-25T10:50:34.008464+00:00', 818 | edited_at: null, 819 | 820 | parent_comment_id: '5fbbf473-6d84-424f-a6d0-113438037fc2', 821 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 822 | total_comment_likes: 0, 823 | post: { 824 | __typename: 'post', 825 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 826 | }, 827 | parent_comment: { 828 | __typename: 'comment', 829 | id: '5fbbf473-6d84-424f-a6d0-113438037fc2' 830 | } 831 | } 832 | ] 833 | }, 834 | { 835 | __typename: 'comment', 836 | id: 'e5da5974-3161-4d86-84e7-df662042bff6', 837 | author_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 838 | author_profile: { 839 | __typename: 'profile', 840 | id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 841 | first_name: 'Team Four', 842 | is_online: false, 843 | is_staff: false, 844 | latest_login: '2022-03-25T09:19:16.806+00:00', 845 | show_online_status: true, 846 | profile_images: [ 847 | { 848 | __typename: 'profile_image', 849 | id: 'e0b577b4-6656-4dee-87c1-0005b4c7049c', 850 | avatar: true, 851 | file_name: 852 | 'eqYoHHDkPjwr_88EE2A5F-E08C-457D-9F41-2C27A867EF5A.jpg', 853 | height: 2048, 854 | order: 0, 855 | profile_id: 'ElklOiioEjfcCH1COD7afU0zFOP2', 856 | uri: 'https://i.pravatar.cc/150?u=a042581f4e290267022', 857 | width: 1154 858 | } 859 | ] 860 | }, 861 | comment_images: [], 862 | comment_liked: false, 863 | comment_likes_aggregate: { 864 | __typename: 'comment_like_aggregate', 865 | nodes: [] 866 | }, 867 | content: 'Last comment!', 868 | created_at: '2022-03-24T12:56:18.64358+00:00', 869 | edited_at: null, 870 | 871 | parent_comment_id: 'ba1ff72d-d0d7-4f0e-b9fa-fbd9c8c1901c', 872 | post_id: '5846ee7d-6f12-481d-86a0-1df26a350de1', 873 | total_comment_likes: 0, 874 | post: { 875 | __typename: 'post', 876 | id: '5846ee7d-6f12-481d-86a0-1df26a350de1' 877 | }, 878 | parent_comment: { 879 | __typename: 'comment', 880 | id: 'ba1ff72d-d0d7-4f0e-b9fa-fbd9c8c1901c' 881 | }, 882 | child_comments: [] 883 | } 884 | ] 885 | } 886 | ]; 887 | -------------------------------------------------------------------------------- /src/components/ArrowIcon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Svg, {Polyline} from 'react-native-svg'; 3 | 4 | export default ({ 5 | // @ts-ignore 6 | size: s = 24, 7 | thickness = s / 16, 8 | color = 'black', 9 | rounded = false, 10 | svgProps = {}, 11 | polylineProps = {} 12 | }) => { 13 | const roundedCorners = rounded 14 | ? {strokeLinecap: 'round', strokeLinejoin: 'round'} 15 | : {}; 16 | 17 | return ( 18 | 19 | {/*@ts-ignore*/} 20 | 28 | 29 | ); 30 | }; 31 | -------------------------------------------------------------------------------- /src/components/CollapsibleView.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | import React, {useCallback, useEffect, useState} from 'react'; 3 | import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'; 4 | import {AnimatedSection, useCollapsible} from 'reanimated-collapsible-helpers'; 5 | import Animated, { 6 | Easing, 7 | interpolate, 8 | useAnimatedStyle, 9 | useDerivedValue, 10 | useSharedValue, 11 | withTiming 12 | } from 'react-native-reanimated'; 13 | import ArrowIcon from './ArrowIcon'; 14 | import Svg from 'react-native-svg'; 15 | 16 | const ROTATE_ANGLE = 180; 17 | 18 | const CollapsibleView = ({ 19 | children = [], 20 | title = '', 21 | touchableWrapperStyle = {}, 22 | initExpanded = false, 23 | expanded = null, 24 | unmountOnCollapse = false, 25 | duration = 200, 26 | collapsibleContainerStyle = {}, 27 | arrowStyling = {}, 28 | noArrow = false, 29 | activeOpacityFeedback = 0.9, 30 | TouchableComponent = TouchableOpacity, 31 | titleProps = {}, 32 | titleStyle = {}, 33 | touchableWrapperProps = {}, 34 | nested = 0, 35 | lastCommentIndex = -1, 36 | length = 0, 37 | collapsedTitle = '', 38 | isParentLast = false, 39 | parentCommentLength = 0 40 | }) => { 41 | const [show, setShow] = useState(initExpanded); 42 | 43 | const {animatedHeight, onPress, onLayout, state, mounted, setMounted} = 44 | useCollapsible({ 45 | state: initExpanded ? 'expanded' : 'collapsed', 46 | unmountOnCollapse, 47 | show 48 | }); 49 | 50 | const rotateAnim = useSharedValue(0); 51 | 52 | if (!mounted && expanded) { 53 | setMounted(true); 54 | } 55 | 56 | const rotation = useDerivedValue(() => { 57 | return interpolate(rotateAnim.value, [180, 360], [180, 360]); 58 | }); 59 | 60 | const arrowAnimatedStyle = useAnimatedStyle(() => { 61 | return { 62 | marginTop: 10, 63 | marginHorizontal: 4, 64 | transform: [ 65 | { 66 | rotate: `${rotation.value}deg` 67 | } 68 | ] 69 | }; 70 | }); 71 | 72 | const handleArrowRotate = useCallback( 73 | (open = null) => { 74 | const _open = open === null ? show : open; 75 | if (!_open) { 76 | rotateAnim.value = withTiming(0, {duration, easing: Easing.ease}); 77 | } else { 78 | rotateAnim.value = withTiming(ROTATE_ANGLE, { 79 | duration, 80 | easing: Easing.ease 81 | }); 82 | } 83 | }, 84 | [duration, rotateAnim, show] 85 | ); 86 | 87 | const handleToggleShow = () => { 88 | if (!mounted) { 89 | if (!show) { 90 | onPress(); 91 | setMounted(true); 92 | } 93 | } else { 94 | onPress(); 95 | setShow(!show); 96 | } 97 | }; 98 | 99 | useEffect(() => { 100 | // this part is to trigger collapsible animation only after he has been fully mounted so animation would 101 | // not be interrupted. 102 | if (mounted) { 103 | setShow(true); 104 | } 105 | }, [mounted]); 106 | 107 | useEffect( 108 | () => { 109 | // on mounting set the rotation angle 110 | rotateAnim.value = show ? 0 : ROTATE_ANGLE; 111 | }, 112 | // eslint-disable-next-line react-hooks/exhaustive-deps 113 | [] 114 | ); 115 | 116 | useEffect(() => { 117 | if (mounted) { 118 | handleArrowRotate(show); 119 | } 120 | if (show !== expanded) { 121 | setShow(expanded); 122 | } 123 | }, [expanded, handleArrowRotate, mounted, show]); 124 | 125 | return ( 126 | 127 | 132 | 141 | 150 | {nested > 1 && 151 | lastCommentIndex > -1 && 152 | parentCommentLength === 1 && 153 | !isParentLast ? ( 154 | 155 | ) : null} 156 | 157 | {nested === 2 && 158 | parentCommentLength === length - 1 && 159 | length > 1 && 160 | !isParentLast ? ( 161 | 162 | ) : null} 163 | 164 | {nested === 2 && parentCommentLength > 1 && !isParentLast ? ( 165 | 166 | ) : null} 167 | 168 | {nested === 2 && 169 | parentCommentLength > length && 170 | length > 1 && 171 | !isParentLast ? ( 172 | 173 | ) : null} 174 | 175 | {nested === 2 && 176 | length > 1 && 177 | parentCommentLength > length && 178 | !isParentLast ? ( 179 | 180 | ) : null} 181 | 182 | {state !== 'expanded' ? ( 183 | 184 | ) : null} 185 | 186 | {noArrow ? null : ( 187 | 188 | 189 | 190 | )} 191 | 192 | {state === 'collapsed' ? title : collapsedTitle} 193 | 194 | 195 | 196 | {mounted ? ( 197 | 205 | {children} 206 | 207 | ) : null} 208 | 209 | ); 210 | }; 211 | 212 | export default CollapsibleView; 213 | 214 | const styles = StyleSheet.create({ 215 | container: { 216 | flex: 1 217 | }, 218 | title: { 219 | color: '#9C9C9C', 220 | fontSize: 16, 221 | marginTop: 10 222 | }, 223 | nestedTwoLine: { 224 | marginBottom: 10, 225 | backgroundColor: '#d9d9d9', 226 | position: 'absolute', 227 | left: -28 228 | }, 229 | horizontalLine: { 230 | backgroundColor: '#d9d9d9', 231 | marginTop: 10 232 | } 233 | }); 234 | -------------------------------------------------------------------------------- /src/components/Comment.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {StyleSheet, TouchableOpacity, View} from 'react-native'; 3 | import { 4 | ActionRowLeftBorderInnerSVG, 5 | ActionRowLeftBorderOuterSVG, 6 | Avatar, 7 | CommentContent, 8 | Container, 9 | Content, 10 | ContentLeftBorderInnerSVG, 11 | ContentLeftBorderOuterSVG, 12 | DateText, 13 | EditedText, 14 | HorizontalTierSVG, 15 | Name, 16 | TopRowLeftBorderInnerSVG, 17 | TopRowLeftBorderOuterSVG, 18 | TopRowWrapper 19 | } from './styledComponents'; 20 | import {format} from 'date-fns'; 21 | 22 | const Comment = ({ 23 | comment, 24 | index, 25 | nested, 26 | hasChildren, 27 | totalChildren, 28 | isParent, 29 | parentCommentLength, 30 | lastCommentParentId, 31 | lastCommentGrandId, 32 | isLast, 33 | isParentLast 34 | }: any) => { 35 | const isLastParent = 36 | lastCommentParentId === comment.parent_comment_id && 37 | parentCommentLength - 1 === index; 38 | 39 | const isLastGrand = lastCommentGrandId === comment.id; 40 | 41 | return ( 42 | 43 | 44 | {nested !== 0 ? ( 45 | 52 | ) : null} 53 | 54 | {isParent && hasChildren && nested === 1 && !isLast ? ( 55 | 61 | ) : null} 62 | 63 | {!isLast && 64 | isParent && 65 | hasChildren && 66 | nested === 1 && 67 | index - 1 < totalChildren ? ( 68 | 74 | ) : null} 75 | 76 | {nested === 2 && !isParentLast ? ( 77 | 83 | ) : null} 84 | 85 | {nested !== 0 ? : null} 86 | 87 | 88 | {}} 91 | style={styles.renderTitleButton}> 92 | 95 | 99 | {comment?.author_profile?.first_name} 100 | 101 | 102 | 103 | 104 | 105 | 106 | {nested === 1 && hasChildren ? ( 107 | 111 | ) : null} 112 | 113 | {!isLast && !isLastParent && nested === 2 ? ( 114 | 118 | ) : null} 119 | 120 | {!isLastGrand && isLastParent && parentCommentLength === 1 ? ( 121 | 125 | ) : null} 126 | 127 | {!isLastGrand && isLastParent && parentCommentLength > 1 ? ( 128 | 132 | ) : null} 133 | 134 | {/*top comment, parent*/} 135 | {isParent && hasChildren && nested === 0 ? ( 136 | 140 | ) : null} 141 | 142 | {nested === 1 && !isLast && !isParent ? ( 143 | 147 | ) : null} 148 | 149 | {isParent && hasChildren && nested === 1 && !isLast ? ( 150 | 154 | ) : null} 155 | 156 | {nested === 2 && !isParentLast ? ( 157 | 161 | ) : null} 162 | 163 | 164 | 169 | {comment.content} 170 | 171 | 174 | {format(new Date(comment.created_at), 'dd-MM-yyyy HH:mm')} 175 | 176 | {comment.edited_at ? ( 177 | 180 | (edited) 181 | 182 | ) : null} 183 | 184 | 185 | 186 | {nested === 1 && hasChildren ? ( 187 | 191 | ) : null} 192 | 193 | {!isLast && !isLastParent && nested === 2 ? ( 194 | 198 | ) : null} 199 | 200 | {isParent && hasChildren && nested === 0 ? ( 201 | 205 | ) : null} 206 | 207 | {nested === 1 && !isLast && !isParent ? ( 208 | 212 | ) : null} 213 | 214 | {isParent && hasChildren && nested === 1 && !isLast ? ( 215 | 219 | ) : null} 220 | 221 | {nested === 2 && !isParentLast ? ( 222 | 226 | ) : null} 227 | 228 | 229 | ); 230 | }; 231 | 232 | const styles = StyleSheet.create({ 233 | closeIcon: { 234 | color: 'black' 235 | }, 236 | contentWrapper: { 237 | flex: 1, 238 | marginTop: 0 239 | }, 240 | renderTitleButton: { 241 | flexDirection: 'row', 242 | alignItems: 'center' 243 | }, 244 | rowDirection: { 245 | flexDirection: 'row' 246 | } 247 | }); 248 | 249 | export default Comment; 250 | -------------------------------------------------------------------------------- /src/components/styledComponents.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import {Image, Text, View} from 'react-native'; 4 | 5 | import Svg from 'react-native-svg'; 6 | 7 | export const Container = styled(View)<{ 8 | commentId: string; 9 | nested: number; 10 | }>` 11 | background-color: white; 12 | flex-direction: column; 13 | margin-left: ${props => 14 | props.nested === 1 || props.nested === 2 ? 12 : 22}px; 15 | margin-right: 22px; 16 | border-left: 1px; 17 | padding-top: 0; 18 | /* padding-right: 26px; 19 | padding-left: ${props => 20 | props.nested === 1 ? 64 : props.nested === 2 ? 88 : 0}px; 21 | */ 22 | `; 23 | 24 | export const CommentContent = React.memo(styled(Text)` 25 | color: black; 26 | font-size: 18px; 27 | line-height: 18px; 28 | `); 29 | 30 | export const Avatar = (props: {source: string}) => { 31 | return ( 32 | 33 | 34 | 35 | 36 | 37 | ); 38 | }; 39 | 40 | // was 12 41 | const AvatarMainContainer = styled(View)` 42 | padding-top: 0; 43 | `; 44 | 45 | const AvatarContainer = styled(View)` 46 | background-color: grey; 47 | border-radius: 50px; 48 | height: 28px; 49 | margin-right: 8px; 50 | overflow: hidden; 51 | width: 28px; 52 | `; 53 | 54 | const AvatarPhoto = styled(Image).attrs(props => ({ 55 | resizeMode: 'cover', 56 | source: {uri: props.source} 57 | }))` 58 | background-color: grey; 59 | border-radius: 50px; 60 | height: 28px; 61 | margin-right: 8px; 62 | overflow: hidden; 63 | width: 28px; 64 | `; 65 | 66 | export const CommentImage = styled(Image)` 67 | background-color: grey; 68 | border-radius: 3px; 69 | height: 100px; 70 | margin-top: 8px; 71 | overflow: hidden; 72 | width: 100px; 73 | `; 74 | 75 | export const TopRowWrapper = styled(View)<{ 76 | nested: number; 77 | hasChildren: boolean; 78 | }>` 79 | flex-direction: row; 80 | flex: 1; 81 | justify-content: space-between; 82 | align-items: center; 83 | margin-bottom: 12px; 84 | margin-top: 12px; 85 | margin-left: ${props => 86 | props.nested === 0 && !props.hasChildren 87 | ? 0 88 | : props.hasChildren && props.nested === 0 89 | ? 0 90 | : props.hasChildren && props.nested === 1 91 | ? 38 92 | : !props.hasChildren && props.nested === 1 93 | ? 38 94 | : !props.hasChildren && props.nested === 2 95 | ? 66 96 | : 0}px; 97 | `; 98 | 99 | export const Content = styled(View)<{ 100 | hasChildren: boolean; 101 | nested: number; 102 | }>` 103 | background-color: #cccccc; 104 | 105 | border-bottom-left-radius: 10px; 106 | border-bottom-right-radius: 10px; 107 | border-top-right-radius: 10px; 108 | margin-left: ${props => 109 | props.nested === 0 && !props.hasChildren 110 | ? 0 111 | : props.hasChildren && props.nested === 0 112 | ? 28 113 | : props.hasChildren && props.nested === 1 114 | ? 66 115 | : !props.hasChildren && props.nested === 1 116 | ? 68 117 | : !props.hasChildren && props.nested === 2 118 | ? 94 119 | : 0}px; 120 | padding-bottom: 12px; 121 | padding: 16px; 122 | `; 123 | 124 | export const ActionRowLeftBorderInnerSVG = ({ 125 | nested, 126 | hasChildren 127 | }: { 128 | nested: number; 129 | hasChildren: boolean; 130 | }) => { 131 | return ( 132 | 152 | ); 153 | }; 154 | 155 | export const ActionRowLeftBorderOuterSVG = ({ 156 | nested, 157 | hasChildren 158 | }: { 159 | nested: number; 160 | hasChildren: boolean; 161 | }) => { 162 | return ( 163 | 183 | ); 184 | }; 185 | 186 | export const ContentLeftBorderInnerSVG = ({ 187 | nested, 188 | hasChildren 189 | }: { 190 | nested: number; 191 | hasChildren: boolean; 192 | }) => { 193 | return ( 194 | 214 | ); 215 | }; 216 | 217 | export const ContentLeftBorderOuterSVG = ({ 218 | nested, 219 | hasChildren 220 | }: { 221 | nested: number; 222 | hasChildren: boolean; 223 | }) => { 224 | return ( 225 | 245 | ); 246 | }; 247 | 248 | export const TopRowLeftBorderInnerSVG = ({ 249 | nested, 250 | hasChildren, 251 | isLast, 252 | isParent, 253 | isLastParent 254 | }: { 255 | nested: number; 256 | hasChildren: boolean; 257 | isLast: boolean; 258 | isParent: boolean | undefined; 259 | isLastParent: boolean | undefined; 260 | }) => { 261 | return ( 262 | 290 | ); 291 | }; 292 | 293 | export const TopRowLeftBorderOuterSVG = ({ 294 | nested, 295 | hasChildren, 296 | isLast, 297 | isLastParent 298 | }: { 299 | nested: number; 300 | hasChildren: boolean; 301 | isLast: boolean; 302 | isLastParent: boolean; 303 | }) => { 304 | return ( 305 | 325 | ); 326 | }; 327 | 328 | export const HorizontalTierSVG = ({nested}: {nested: number}) => { 329 | return ( 330 | 340 | ); 341 | }; 342 | 343 | export const Name = styled(Text)<{name: string}>` 344 | color: black; 345 | font-size: ${(props: any) => (props?.name?.length > 15 ? 14 : 16)}px; 346 | font-weight: bold; 347 | `; 348 | 349 | export const DateText = styled(Text)` 350 | color: black; 351 | font-size: 12px; 352 | margin-top: 12px; 353 | `; 354 | 355 | export const EditedText = styled(Text)` 356 | color: black; 357 | font-size: 12px; 358 | font-style: italic; 359 | line-height: 12px; 360 | margin-left: 1px; 361 | margin-top: 10px; 362 | `; 363 | 364 | export const NameRow = styled(View)` 365 | align-items: center; 366 | flex-direction: row; 367 | justify-content: space-between; 368 | `; 369 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | function keyExtractor(item: any) { 2 | if (typeof item === 'object' && item?.key != null) { 3 | return item.key; 4 | } 5 | if (typeof item === 'object' && item?.id != null) { 6 | return item.id; 7 | } 8 | } 9 | 10 | function keyExtractorParent(item: any) { 11 | if (typeof item === 'object' && item?.key != null) { 12 | return item.key; 13 | } 14 | if (typeof item === 'object' && item?.parent_comment_id != null) { 15 | return item.parent_comment_id; 16 | } 17 | } 18 | 19 | export const getLastChildCommentId = (item: any) => { 20 | if (!item) { 21 | return; 22 | } 23 | const items = item['child_comments']; 24 | return keyExtractor(items[items.length - 1]); 25 | }; 26 | 27 | export const getLastChildCommentIdFromParent = (item: any) => { 28 | if (!item) { 29 | return; 30 | } 31 | const items = item['child_comments']; 32 | return keyExtractorParent(items[items?.length - 1]); 33 | }; 34 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "compilerOptions": { 4 | /* Basic Options */ 5 | "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | "lib": ["es2017"], /* Specify library files to be included in the compilation. */ 8 | "allowJs": true, /* Allow javascript files to be compiled. */ 9 | // "checkJs": true, /* Report errors in .js files. */ 10 | "jsx": "react-native", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 11 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 12 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 13 | // "outFile": "./", /* Concatenate and emit output to single file. */ 14 | // "outDir": "./", /* Redirect output structure to the directory. */ 15 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 16 | // "removeComments": true, /* Do not emit comments to output. */ 17 | "noEmit": true, /* Do not emit outputs. */ 18 | // "incremental": true, /* Enable incremental compilation */ 19 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 20 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 21 | "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 22 | 23 | /* Strict Type-Checking Options */ 24 | "strict": true, /* Enable all strict type-checking options. */ 25 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 26 | // "strictNullChecks": true, /* Enable strict null checks. */ 27 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 28 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 29 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 30 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 31 | 32 | /* Additional Checks */ 33 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 34 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 35 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 36 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 37 | 38 | /* Module Resolution Options */ 39 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 40 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 41 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 42 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 43 | // "typeRoots": [], /* List of folders to include type definitions from. */ 44 | // "types": [], /* Type declaration files to be included in compilation. */ 45 | "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 46 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 47 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 48 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 49 | "resolveJsonModule": true /* Allows importing modules with a ‘.json’ extension, which is a common practice in node projects. */ 50 | 51 | /* Source Map Options */ 52 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 53 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ 54 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 55 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 56 | 57 | /* Experimental Options */ 58 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 59 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 60 | }, 61 | "exclude": [ 62 | "node_modules", "babel.config.js", "metro.config.js", "jest.config.js" 63 | ] 64 | } 65 | --------------------------------------------------------------------------------