Compare commits

...
15 changed files with 552 additions and 232 deletions

No files matched your search

+6 -1
View File
@@ -243,5 +243,10 @@
"Are you a supermodel or rockstar that received a custom reward code? Claim it here.": "Are you a supermodel or rockstar that received a custom reward code? Claim it here.",
"Redeem": "Redeem",
"Please confirm that you want to use LBRY without creating an account.": "Please confirm that you want to use LBRY without creating an account.",
"You sent %amount% LBC as a tip, Mahalo!": "You sent %amount% LBC as a tip, Mahalo!"
"You sent %amount% LBC as a tip, Mahalo!": "You sent %amount% LBC as a tip, Mahalo!",
"%follower% follower": "%follower% follower",
"Authenticating": "Authenticating",
"Waiting for authentication": "Waiting for authentication",
"Delete file": "Delete file",
"Are you sure you want to remove this file from your device?": "Are you sure you want to remove this file from your device?"
}
+253 -54
View File
@@ -2073,6 +2073,11 @@
}
}
},
"@react-native-community/masked-view": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.5.tgz",
"integrity": "sha512-Lj1DzfCmW0f4HnmHtEuX8Yy2f7cnUA8r5KGGUuDDGtQt1so6QJkKeUmsnLo2zYDtsF8due6hvIL06Vdo5xxuLQ=="
},
"@react-navigation/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
@@ -2111,6 +2116,21 @@
"requires": {
"react-is": "^16.7.0"
}
},
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
}
}
},
@@ -7047,8 +7067,8 @@
}
},
"lbry-redux": {
"version": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"from": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"version": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"from": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0",
@@ -9825,9 +9845,9 @@
}
},
"react-native-exception-handler": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.9.0.tgz",
"integrity": "sha512-XRHhGH5aM4lSenX4zZBa07JaszJGXeF8cv1KY314Q4qJWOihKWLpkdvwqwsBieZ2iy8DPhdAVioQzw8JLD/Okw=="
"version": "2.10.8",
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.10.8.tgz",
"integrity": "sha512-ZN+jwpADRkCUNdad/50k0mZdMoICGrGdtaxgvRU+pNcWRRBAXJhuo4+jY0eQaoVpx1ghycGE6tBu9ka8gL2NOQ=="
},
"react-native-fast-image": {
"version": "7.0.2",
@@ -9890,13 +9910,10 @@
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
"integrity": "sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw=="
},
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
}
"react-native-safe-area-context": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-0.6.2.tgz",
"integrity": "sha512-VtBW0JymVCwVt0TGxTv25Co3wtOv3Yb/K5pAUYkjKXNhWFDz5ZwUG/Yho/p0EkWYlFdroJcSqlvVFl2n3AU7SA=="
},
"react-native-screens": {
"version": "1.0.0-alpha.23",
@@ -9928,12 +9945,9 @@
}
},
"react-native-tab-view": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz",
"integrity": "sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==",
"requires": {
"prop-types": "^15.6.1"
}
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz",
"integrity": "sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w=="
},
"react-native-vector-icons": {
"version": "6.6.0",
@@ -10096,40 +10110,48 @@
"shaka-player": "^2.4.4"
}
},
"react-navigation": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-3.13.0.tgz",
"integrity": "sha512-r64bTImY2aNye8wtd39ubouVB6ZMJqjVQYKxH4LFmOav4FsI59fQTDN7sZzyJa29owowYw/wVkh+NWGT+tdD1A==",
"react-native-webview": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-8.0.2.tgz",
"integrity": "sha512-Higfj0CCPM9N76S3rQsKHKS8Rw5QA7h7UENrREmMarEN/2saZJ+ko0aIVYOlEJ4P9ZhhRLNH/3mWvzmT4spncw==",
"requires": {
"@react-navigation/core": "~3.5.1",
"@react-navigation/native": "~3.6.2",
"react-navigation-drawer": "~1.4.0",
"react-navigation-stack": "1.5.3",
"react-navigation-tabs": "~1.2.0"
"escape-string-regexp": "2.0.0",
"invariant": "2.2.4"
},
"dependencies": {
"react-navigation-drawer": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
"requires": {
"react-native-tab-view": "^1.2.0"
}
},
"react-navigation-stack": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.5.3.tgz",
"integrity": "sha512-MQcwDVbZUYsTtDJb5cFOSm+K+e7KpUCoROaGoUOR+JHWE3uuaJ3pd/Nu+32a57J98TNBf4qq0+2TPJWl6z6IBg==",
"requires": {
"prop-types": "^15.7.2"
}
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
}
}
},
"react-navigation": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-4.0.10.tgz",
"integrity": "sha512-7PqvmsdQ7HIyxPUMYbd9Uq//VoMdniEOLAOSvIhb/ExtbAt/1INSjUF+RiMWOMCWLTCNvNPRvTz7xy7qwWureg==",
"requires": {
"@react-navigation/core": "^3.5.1",
"@react-navigation/native": "^3.6.2"
}
},
"react-navigation-drawer": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
"integrity": "sha512-d/rA8Slqv7HoMfONKVDBQUrRF7YQH796Gzal/KOhaY4VOwUUqIwfxMRJ3WrsdL2OkDPixtkXJE2Fz6KAj658uA=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
"requires": {
"react-native-tab-view": "^1.2.0"
},
"dependencies": {
"react-native-tab-view": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz",
"integrity": "sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==",
"requires": {
"prop-types": "^15.6.1"
}
}
}
},
"react-navigation-redux-helpers": {
"version": "3.0.2",
@@ -10140,21 +10162,47 @@
}
},
"react-navigation-stack": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.8.1.tgz",
"integrity": "sha512-XOkHuYlQjZKnD4jTU0Ml847sKjpwsJpQ6JX4ZfOq8D0e6fPWXbpYNhvUnzHMHMm+tnbhTqkqP1Umu40Hmx748Q==",
"version": "1.10.3",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.10.3.tgz",
"integrity": "sha512-1gksFi/g/Lg9sBhgLlD0OiEB5xnatHb4C0eNMA5tli9cTVlhq375XNPIqOiTyftibBmjdApAsZFj5srUCoOu/w==",
"requires": {
"prop-types": "^15.7.2"
}
},
"react-navigation-tabs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-1.2.0.tgz",
"integrity": "sha512-I6vq3XX4ub9KhWQzcrggznls+2Z2C6w2ro46vokDGGvJ02CBpQRar7J0ETV29Ot5AJY67HucNUmZdH3yDFckmQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-2.7.0.tgz",
"integrity": "sha512-fQEHjFrIBi+89loLL521HjGS0Z9tl4Y89SSamRkDl8Of6bPS1Ep++an3ctl2j7c3veqBZBrj3H1qa7qjd3apBQ==",
"requires": {
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.1",
"react-native-tab-view": "^1.4.1"
"hoist-non-react-statics": "^3.3.0",
"react-lifecycles-compat": "^3.0.4",
"react-native-safe-area-view": "^0.14.6",
"react-native-tab-view": "^2.11.0"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
"integrity": "sha512-wbg3bpgA/ZqWrZuMOeJi8+SKMhr7X9TesL/rXMjTzh0p0JUBo3II8DHboYbuIXWRlttrUFxwcu/5kygrCw8fJw==",
"requires": {
"react-is": "^16.7.0"
}
},
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
}
}
},
"react-redux": {
@@ -10852,6 +10900,157 @@
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
},
"showdown": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz",
"integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==",
"requires": {
"yargs": "^14.2"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
}
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"p-limit": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
}
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yargs": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.2.tgz",
"integrity": "sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA==",
"requires": {
"cliui": "^5.0.0",
"decamelize": "^1.2.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^15.0.0"
}
},
"yargs-parser": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.0.tgz",
"integrity": "sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
}
}
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+11 -6
View File
@@ -12,7 +12,7 @@
"base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
@@ -20,9 +20,10 @@
"react": "16.9.0",
"react-native": "0.61.5",
"@react-native-community/async-storage": "^1.5.1",
"@react-native-community/masked-view": "^0.1.5",
"react-native-camera": "^3.15.0",
"react-native-country-picker-modal": "^1.10.0",
"react-native-exception-handler": "2.9.0",
"react-native-exception-handler": "2.10.8",
"react-native-fast-image": "^7.0.2",
"react-native-fs": "^2.13.3",
"react-native-gesture-handler": "1.5.2",
@@ -30,14 +31,17 @@
"react-native-password-strength-meter": "^0.0.2",
"react-native-phone-input": "lbryio/react-native-phone-input",
"react-native-reanimated": "1.4.0",
"react-native-safe-area-context": "^0.6.2",
"react-native-snackbar": "2.0.4",
"react-native-super-grid": "^3.0.4",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
"react-navigation": "^3.13.0",
"react-navigation-drawer": "^2.3.3",
"react-native-webview": "^8.0.2",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^1.4.0",
"react-navigation-redux-helpers": "^3.0.2",
"react-navigation-stack": "^1.8.1",
"react-navigation-tabs": "^2.7.0",
"react-navigation-stack": "^1.10.3",
"react-redux": "^5.0.3",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
@@ -46,7 +50,8 @@
"redux-persist-transform-filter": "0.0.18",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "0.12.0",
"seedrandom": "3.0.3"
"seedrandom": "3.0.3",
"showdown": "1.9.1"
},
"devDependencies": {
"@babel/core": "^7.6.2",
+8 -7
View File
@@ -108,7 +108,7 @@ const discoverStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
}
},
);
discoverStack.navigationOptions = ({ navigation }) => {
@@ -142,7 +142,7 @@ const walletStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
}
},
);
const drawerIconSize = 18;
@@ -231,11 +231,12 @@ const drawer = createDrawerNavigator(
backBehavior: 'none',
unmountInactiveRoutes: true,
contentComponent: DrawerContent,
overlayColor: 'rgba(0, 0, 0, 0.7)',
contentOptions: {
activeTintColor: Colors.LbryGreen,
labelStyle: discoverStyle.menuText,
},
}
},
);
const mainStackNavigator = new createStackNavigator(
@@ -264,7 +265,7 @@ const mainStackNavigator = new createStackNavigator(
},
{
headerMode: 'none',
}
},
);
export const AppNavigator = mainStackNavigator;
@@ -303,7 +304,7 @@ class AppWithNavigationState extends React.Component {
}
return false;
}.bind(this)
}.bind(this),
);
}
@@ -346,7 +347,7 @@ class AppWithNavigationState extends React.Component {
},
error => {
/* failed */
}
},
);
};
@@ -519,7 +520,7 @@ class AppWithNavigationState extends React.Component {
dispatch(
doToast({
message: 'Invalid Verification URI',
})
}),
);
}
} else {
+11 -11
View File
@@ -43,7 +43,17 @@ class FileDownloadButton extends React.PureComponent {
onButtonLayout,
} = this.props;
if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
if (fileInfo && fileInfo.download_path && fileInfo.completed) {
return (
<TouchableOpacity
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={openFile}
>
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
</TouchableOpacity>
);
} else if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
@@ -70,16 +80,6 @@ class FileDownloadButton extends React.PureComponent {
onPress={onFileActionPress}
/>
);
} else if (fileInfo && fileInfo.download_path) {
return (
<TouchableOpacity
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={openFile}
>
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
</TouchableOpacity>
);
}
return null;
+36 -27
View File
@@ -18,18 +18,20 @@ class UriBar extends React.PureComponent {
keyboardDidHideListener = null;
changeTextTimeout = -1;
state = {
changeTextTimeout: null,
currentValue: null,
inputText: null,
focused: false,
keyboardHeight: 0,
selection: undefined,
};
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
this.setSelection();
this.setState({ selection: { start: 0, end: 0 } });
}
componentWillUnmount() {
@@ -51,15 +53,14 @@ class UriBar extends React.PureComponent {
}
handleChangeText = text => {
this.setState({ selection: undefined });
const newValue = text || '';
clearTimeout(this.state.changeTextTimeout);
clearTimeout(this.changeTextTimeout);
const { updateSearchQuery, onSearchSubmitted, showUriBarSuggestions, navigation } = this.props;
updateSearchQuery(text);
let timeout = -1;
this.changeTextTimeout = -1;
if (!showUriBarSuggestions) {
timeout = setTimeout(() => {
this.changeTextTimeout = setTimeout(() => {
if (text.trim().length === 0) {
// don't do anything if the text is empty
return;
@@ -67,6 +68,7 @@ class UriBar extends React.PureComponent {
if (!text.startsWith('lbry://')) {
// not a URI input, so this is a search, perform a direct search
updateSearchQuery(text);
if (onSearchSubmitted) {
onSearchSubmitted(text);
} else {
@@ -74,8 +76,10 @@ class UriBar extends React.PureComponent {
}
}
}, UriBar.INPUT_TIMEOUT);
} else {
updateSearchQuery(text);
}
this.setState({ inputText: newValue, currentValue: newValue, changeTextTimeout: timeout });
this.setState({ inputText: newValue, currentValue: newValue });
};
handleItemPress = item => {
@@ -85,7 +89,7 @@ class UriBar extends React.PureComponent {
Keyboard.dismiss();
if (SEARCH_TYPES.SEARCH === type) {
this.setState({ currentValue: value }, () => this.setCaretPosition(value));
this.setState({ currentValue: value });
updateSearchQuery(value);
if (onSearchSubmitted) {
@@ -123,12 +127,6 @@ class UriBar extends React.PureComponent {
this.setState({ focused: false, keyboardHeight: 0 });
};
setSelection() {
if (this.textInput && !this.state.focused) {
this.textInput.setNativeProps({ selection: { start: 0, end: 0 } });
}
}
handleSubmitEditing = () => {
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
if (this.state.inputText) {
@@ -159,6 +157,26 @@ class UriBar extends React.PureComponent {
}
};
handleFocus = () => {
this.setState(
{
focused: true,
},
() => {
this.setState({
selection: { start: 0, end: this.state.currentValue ? this.state.currentValue.length : 0 },
});
},
);
};
handleBlur = () => {
this.setState({
focused: false,
selection: { start: 0, end: 0 },
});
};
onSearchPageBlurred() {
this.setState({ currenValueSet: false });
}
@@ -252,12 +270,7 @@ class UriBar extends React.PureComponent {
}}
autoCorrect={false}
style={uriBarStyle.uriText}
onLayout={() => {
if (!this.state.focused) {
this.setSelection();
}
}}
selectTextOnFocus
selection={this.state.selection}
placeholder={__('Search movies, music, and more')}
underlineColorAndroid={'transparent'}
numberOfLines={1}
@@ -266,13 +279,9 @@ class UriBar extends React.PureComponent {
returnKeyType={'go'}
inlineImageLeft={'baseline_search_black_24'}
inlineImagePadding={16}
onFocus={() => this.setState({ focused: true })}
onBlur={() => {
this.setState({ focused: false });
this.setSelection();
}}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onChangeText={this.handleChangeText}
onChange={this.handleChange}
onSubmitEditing={this.handleSubmitEditing}
/>
)}
+1 -1
View File
@@ -134,7 +134,7 @@ const Constants = {
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
DEFAULT_PAGE_SIZE: 10,
DEFAULT_PAGE_SIZE: 20,
ALL_PLACEHOLDER: '_all',
+1 -1
View File
@@ -200,7 +200,7 @@ const store = createStore(
);
window.store = store;
const persistor = persistStore(store, persistOptions, err => {
const persistor = persistStore(store, null, err => {
if (err) {
console.log('Unable to load saved SETTINGS');
}
+114 -47
View File
@@ -17,8 +17,8 @@ import {
TouchableOpacity,
TouchableWithoutFeedback,
View,
WebView,
} from 'react-native';
import { WebView } from 'react-native-webview';
import { NavigationEvents } from 'react-navigation';
import { navigateBack, navigateToUri, formatLbryUrlForWeb } from 'utils/helper';
import Icon from 'react-native-vector-icons/FontAwesome5';
@@ -45,6 +45,8 @@ import Video from 'react-native-video';
import FileRewardsDriver from 'component/fileRewardsDriver';
import filePageStyle from 'styles/filePage';
import uriBarStyle from 'styles/uriBar';
import RNFS from 'react-native-fs';
import showdown from 'showdown';
import _ from 'lodash';
class FilePage extends React.PureComponent {
@@ -58,6 +60,10 @@ class FilePage extends React.PureComponent {
startTime = null;
webView = null;
converter = null;
constructor(props) {
super(props);
this.state = {
@@ -145,6 +151,7 @@ class FilePage extends React.PureComponent {
failedPurchaseUris: prevFailedPurchaseUris,
fetchViewCount,
purchasedUris: prevPurchasedUris,
purchaseUriErrorMessage: prevPurchaseUriErrorMessage,
navigation,
contentType,
notify,
@@ -166,7 +173,11 @@ class FilePage extends React.PureComponent {
this.onComponentFocused();
}
if (failedPurchaseUris.includes(uri) && !purchasedUris.includes(uri)) {
if (
failedPurchaseUris.includes(uri) &&
!purchasedUris.includes(uri) &&
prevPurchaseUriErrorMessage !== purchaseUriErrorMessage
) {
if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) {
notify({ message: purchaseUriErrorMessage, isError: true });
}
@@ -222,17 +233,7 @@ class FilePage extends React.PureComponent {
}
componentDidUpdate(prevProps, prevState) {
const {
claim,
contentType,
costInfo,
fileInfo,
isResolvingUri,
resolveUri,
navigation,
purchaseUri,
title,
} = this.props;
const { claim, contentType, costInfo, fileInfo, isResolvingUri, resolveUri, navigation, title } = this.props;
const { uri } = this.state;
if (!isResolvingUri && claim === undefined && uri) {
resolveUri(uri);
@@ -259,6 +260,24 @@ class FilePage extends React.PureComponent {
if (((costInfo && costInfo.cost > 0) || !isPlayable) && !this.state.showRecommended) {
this.setState({ showRecommended: true });
}
if (
!fileInfo &&
!this.state.autoDownloadStarted &&
claim &&
costInfo &&
costInfo.cost === 0 &&
(isPlayable || (this.state.uriVars && this.state.uriVars.download === 'true'))
) {
this.setState({ autoDownloadStarted: true }, () => {
if (!isPlayable) {
this.checkStoragePermissionForDownload();
} else {
this.confirmPurchaseUri(claim.permanent_url, costInfo, !isPlayable);
}
NativeModules.UtilityModule.checkDownloads();
});
}
}
fetchFileInfo(uri, props) {
@@ -276,9 +295,8 @@ class FilePage extends React.PureComponent {
handleFullscreenToggle = isFullscreen => {
const { toggleFullscreenMode } = this.props;
this.setState({ fullscreenMode: isFullscreen });
toggleFullscreenMode(isFullscreen);
StatusBar.setHidden(isFullscreen);
toggleFullscreenMode(isFullscreen);
if (isFullscreen) {
// fullscreen, so change orientation to landscape mode
@@ -290,9 +308,11 @@ class FilePage extends React.PureComponent {
// Switch back to portrait mode when the media is not fullscreen
NativeModules.ScreenOrientation.lockOrientationPortrait();
// hide the navigation bar (on devices that have the soft navigation bar)
// show the navigation bar (on devices that have the soft navigation bar)
NativeModules.UtilityModule.showNavigationBar();
}
StatusBar.setHidden(isFullscreen);
};
onEditPressed = () => {
@@ -687,6 +707,18 @@ class FilePage extends React.PureComponent {
navigateBack(navigation, drawerStack, popDrawerStack);
};
onOpenFilePressed = () => {
const { contentType, fileInfo, notify } = this.props;
const localFileUri = this.localUriForFileInfo(fileInfo);
const mediaType = Lbry.getMediaType(contentType);
const isViewable = mediaType === 'image' || mediaType === 'text';
if (isViewable) {
this.openFile(localFileUri, mediaType, contentType);
} else {
notify({ message: __('This file cannot be displayed in the LBRY app.') });
}
};
onSaveFilePressed = () => {
const { costInfo, fileGet, fileInfo, navigation, purchasedUris, purchaseUri } = this.props;
const { uri } = navigation.state.params;
@@ -699,7 +731,7 @@ class FilePage extends React.PureComponent {
}
};
openFile = (localFileUri, mediaType) => {
openFile = (localFileUri, mediaType, contentType) => {
const { pushDrawerStack } = this.props;
const isWebViewable = mediaType === 'text';
@@ -726,12 +758,55 @@ class FilePage extends React.PureComponent {
{
showWebView: true,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
() => {
pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW);
},
);
}
}
};
handleWebViewLoad = () => {
const { contentType, fileInfo } = this.props;
const localFileUri = this.localUriForFileInfo(fileInfo);
if (this.webView && ['text/markdown', 'text/md'].includes(contentType)) {
RNFS.readFile(localFileUri, 'utf8').then(markdown => {
if (this.webView) {
if (!this.converter) {
this.converter = new showdown.Converter();
}
const html = this.converter.makeHtml(markdown);
this.webView.injectJavaScript(
'document.getElementById("content").innerHTML = \'' +
html.replace(/\n/g, '').replace(/'/g, "\\'") +
"'; true;",
);
}
});
}
};
buildWebViewSource = () => {
const { contentType, fileInfo } = this.props;
const localFileUri = this.localUriForFileInfo(fileInfo);
if (['text/markdown', 'text/md'].includes(contentType)) {
const html =
'<!doctype html>' +
'<html>' +
' <head>' +
' <meta charset="utf-8"/>' +
' </head>' +
' <body>' +
' <div id="content"></div>' +
' </body>' +
'</html>';
return { html };
}
return { uri: localFileUri };
};
render() {
const {
balance,
@@ -767,7 +842,7 @@ class FilePage extends React.PureComponent {
<View style={filePageStyle.pageContainer}>
<UriBar value={uri} navigation={navigation} />
{isResolvingUri && (
<View style={filePageStyle.busyContainer}>
<View stylebuildWeb={filePageStyle.busyContainer}>
<ActivityIndicator size="large" color={Colors.NextLbryGreen} />
<Text style={filePageStyle.infoText}>{__('Loading decentralized data...')}</Text>
</View>
@@ -878,25 +953,9 @@ class FilePage extends React.PureComponent {
const localFileUri = this.localUriForFileInfo(fileInfo);
const unsupported = !isPlayable && !canOpen;
if (
!this.state.autoDownloadStarted &&
claim &&
costInfo &&
((isPlayable && costInfo.cost === 0) || (this.state.uriVars && this.state.uriVars.download === 'true'))
) {
this.setState({ autoDownloadStarted: true }, () => {
if (!isPlayable) {
this.checkStoragePermissionForDownload();
} else {
this.confirmPurchaseUri(claim.permanent_url, costInfo, !isPlayable);
}
NativeModules.UtilityModule.checkDownloads();
});
}
if (this.state.downloadPressed && canOpen && !this.state.autoOpened) {
// automatically open a web viewable or image file after the download button is pressed
this.setState({ autoOpened: true }, () => this.openFile(localFileUri, mediaType));
this.setState({ autoOpened: true }, () => this.openFile(localFileUri, mediaType, contentType));
}
if (isChannel) {
@@ -907,9 +966,18 @@ class FilePage extends React.PureComponent {
<View style={filePageStyle.pageContainer}>
{!this.state.fullscreenMode && <UriBar value={uri} navigation={navigation} />}
{innerContent}
{this.state.showWebView && isWebViewable && (
<WebView allowFileAccess source={{ uri: localFileUri }} style={filePageStyle.viewer} />
<WebView
ref={ref => {
this.webView = ref;
}}
allowFileAccess
javaScriptEnabled
originWhiteList={['*']}
source={this.buildWebViewSource()}
style={filePageStyle.viewer}
onLoad={this.handleWebViewLoad}
/>
)}
{this.state.showImageViewer && (
<ImageViewer
@@ -968,7 +1036,7 @@ class FilePage extends React.PureComponent {
<FileDownloadButton
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
style={filePageStyle.downloadButton}
openFile={() => this.openFile(localFileUri, mediaType)}
openFile={() => this.openFile(localFileUri, mediaType, contentType)}
isPlayable={isPlayable}
isViewable={isViewable}
onFileActionPress={this.onFileDownloadButtonPressed}
@@ -1075,13 +1143,12 @@ class FilePage extends React.PureComponent {
{!canEdit && !isPlayable && (
<View style={filePageStyle.sharedLargeButton}>
{!fileInfo ||
(fileInfo.written_bytes <= 0 && !completed && (
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
<Icon name={'download'} size={16} style={filePageStyle.largeButtonIcon} />
<Text style={filePageStyle.largeButtonText}>{__('Download')}</Text>
</TouchableOpacity>
))}
{(!fileInfo || (fileInfo.written_bytes <= 0 && !completed)) && (
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
<Icon name={'download'} size={16} style={filePageStyle.largeButtonIcon} />
<Text style={filePageStyle.largeButtonText}>{__('Download')}</Text>
</TouchableOpacity>
)}
{!completed &&
fileInfo &&
@@ -1095,7 +1162,7 @@ class FilePage extends React.PureComponent {
</TouchableOpacity>
)}
{completed && fileInfo && fileInfo.written_bytes >= fileInfo.total_bytes && (
{completed && fileInfo && (
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onOpenFilePressed}>
<Icon name={'folder-open'} size={16} style={filePageStyle.largeButtonIcon} />
<Text style={filePageStyle.largeButtonText}>{__('Open')}</Text>
+7 -5
View File
@@ -5,6 +5,7 @@ import {
doResolvedSearch,
doUpdateSearchQuery,
makeSelectResolvedSearchResults,
makeSelectResolvedSearchResultsLastPageReached,
makeSelectSearchUris,
selectClaimSearchByQuery,
selectIsSearching,
@@ -17,20 +18,21 @@ import { selectCurrentRoute } from 'redux/selectors/drawer';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import SearchPage from './view';
const numSearchResults = 25;
const select = state => ({
claimSearchByQuery: selectClaimSearchByQuery(state),
currentRoute: selectCurrentRoute(state),
isSearching: selectIsSearching(state),
query: selectSearchValue(state),
resolvingUris: selectResolvingUris(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
)(state),
});
const perform = dispatch => ({
search: query => dispatch(doResolvedSearch(query, numSearchResults, null, false, {})),
search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
claimSearch: options => dispatch(doClaimSearch(options)),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
+49 -25
View File
@@ -20,14 +20,18 @@ import FloatingWalletBalance from 'component/floatingWalletBalance';
import UriBar from 'component/uriBar';
import searchStyle from 'styles/search';
const softLimit = 500;
class SearchPage extends React.PureComponent {
state = {
currentQuery: null,
currentFrom: 0,
currentUri: null,
showTagResult: false,
claimSearchRun: false,
claimSearchOptions: null,
resultsResolved: false,
tagResultDisplayed: false,
};
static navigationOptions = {
@@ -55,14 +59,16 @@ class SearchPage extends React.PureComponent {
const searchQuery = query || this.getSearchQuery();
if (searchQuery && searchQuery.trim().length > 0) {
this.setState({
currentFrom: 0,
currentQuery: searchQuery,
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(searchQuery);
search(searchQuery, 0);
}
});
};
@@ -81,11 +87,13 @@ class SearchPage extends React.PureComponent {
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
this.setState({
currentFrom: 0,
currentQuery: query,
currentUri: isURIValid(query) ? normalizeURI(query) : null,
resultsResolved: false,
tagResultDisplayed: false,
});
search(query);
search(query, 0);
}
}
@@ -111,14 +119,12 @@ class SearchPage extends React.PureComponent {
} */
componentDidUpdate() {
/* const { isSearching, resolveUris, uris } = this.props;
if (!isSearching && !this.state.resultsResolved) {
this.setState({ resultsResolved: true }, () => {
if (uris && uris.length > 0) {
resolveUris(uris);
}
});
} */
const { claimSearchByQuery } = this.props;
if (this.state.claimSearchRun && this.state.claimSearchOptions && !this.state.tagResultDisplayed) {
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
const claimSearchUris = claimSearchByQuery[claimSearchKey];
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0, tagResultDisplayed: true });
}
}
getSearchQuery() {
@@ -133,12 +139,15 @@ class SearchPage extends React.PureComponent {
const { search } = this.props;
this.setState({
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
currentFrom: 0,
currentQuery: keywords,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(keywords);
search(keywords, 0);
};
listEmptyComponent = () => {
@@ -152,27 +161,20 @@ class SearchPage extends React.PureComponent {
);
};
listHeaderComponent = showTagResult => {
const { navigation, claimSearch, claimSearchByQuery } = this.props;
listHeaderComponent = (showTagResult, query) => {
const { navigation, claimSearch } = this.props;
const { currentUri } = this.state;
const query = this.getSearchQuery();
const canBeTag = query && query.trim().length > 0 && isURIValid(query);
if (canBeTag && !this.state.claimSearchRun) {
const options = {
any_tags: [query],
any_tags: [query.toLowerCase()],
page: 1,
no_totals: true,
};
this.setState({ claimSearchOptions: options, claimSearchRun: true }, () => claimSearch(options));
}
/* if (this.state.claimSearchRun && this.state.claimSearchOptions) {
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
const claimSearchUris = claimSearchByQuery[claimSearchKey];
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0 });
} */
return (
<View>
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
@@ -191,6 +193,21 @@ class SearchPage extends React.PureComponent {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
};
handleVerticalEndReached = () => {
// fetch more results
const { lastPageReached, results, search, isSearching } = this.props;
if (lastPageReached || (results && results.length > softLimit)) {
return;
}
if (!isSearching) {
const from = results ? results.length : 0;
this.setState({ currentFrom: from }, () => {
search(this.state.currentQuery, from);
});
}
};
render() {
const { isSearching, navigation, query, results } = this.props;
@@ -198,13 +215,13 @@ class SearchPage extends React.PureComponent {
<View style={searchStyle.container}>
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
{isSearching && (
{isSearching && this.state.currentFrom === 0 && (
<View style={searchStyle.busyContainer}>
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
</View>
)}
{!isSearching && (
{(!isSearching || this.state.currentFrom > 0) && (
<FlatList
extraData={this.state}
style={searchStyle.scrollContainer}
@@ -212,16 +229,23 @@ class SearchPage extends React.PureComponent {
keyboardShouldPersistTaps={'handled'}
data={results}
keyExtractor={(item, index) => item.claimId}
initialNumToRender={8}
initialNumToRender={10}
maxToRenderPerBatch={20}
onEndReached={this.handleVerticalEndReached}
onEndReachedThreshold={0.2}
removeClippedSubviews
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
ListHeaderComponent={this.state.currentUri ? this.listHeaderComponent(this.state.showTagResult) : null}
ListHeaderComponent={this.listHeaderComponent(this.state.showTagResult, this.state.currentQuery)}
renderItem={({ item }) => (
<FileResultItem key={item.claimId} result={item} style={searchStyle.resultItem} navigation={navigation} />
)}
/>
)}
{this.state.currentFrom > 0 && isSearching && (
<View style={searchStyle.moreLoading}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
</View>
)}
<FloatingWalletBalance navigation={navigation} />
</View>
);
+31 -31
View File
@@ -94,9 +94,9 @@ class SplashScreen extends React.PureComponent {
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
});
this.navigateToMain();
return;
}
@@ -137,32 +137,32 @@ class SplashScreen extends React.PureComponent {
user,
} = this.props;
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
checkSubscriptionsInit();
// Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
checkSubscriptionsInit();
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
});
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS));
});
}
});
});
this.navigateToMain();
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS));
});
}
// });
};
handleAccountUnlockFailed() {
@@ -200,8 +200,8 @@ class SplashScreen extends React.PureComponent {
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
if (unlocked) {
this.setState({
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
});
this.finishSplashScreen();
} else {
@@ -210,8 +210,8 @@ class SplashScreen extends React.PureComponent {
});
} else {
this.setState({
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
});
this.finishSplashScreen();
}
@@ -315,8 +315,8 @@ class SplashScreen extends React.PureComponent {
this.setState(
{
accountUnlockFailed: false,
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
},
() => this.finishSplashScreen(),
);
@@ -34,6 +34,7 @@ class PhoneVerifyPage extends React.PureComponent {
codeVerifyStarted: false,
codeVerifySuccessful: false,
countryCode: null,
countryPickerVisible: false,
newPhoneAdded: false,
number: null,
phoneVerifyFailed: false,
@@ -125,15 +126,15 @@ class PhoneVerifyPage extends React.PureComponent {
};
onPressFlag = () => {
if (this.picker) {
this.picker.openModal();
}
this.setState({ countryPickerVisible: true });
};
selectCountry(country) {
selectCountry = country => {
this.phoneInput.selectCountry(country.cca2.toLowerCase());
this.setState({ cca2: country.cca2 });
}
this.setState({ cca2: country.cca2, countryPickerVisible: false }, () => {
this.phoneInput.focus();
});
};
handleChangeText = text => {
this.setState({ verificationCode: text });
@@ -233,17 +234,17 @@ class PhoneVerifyPage extends React.PureComponent {
</View>
<CountryPicker
ref={picker => {
this.picker = picker;
}}
cca2={this.state.cca2}
filterable
onChange={value => this.selectCountry(value)}
showCallingCode
countryCode={this.state.cca2}
withAlphaFilter
withFilter
withFlag
withFlagButton={false}
withCallingCode
withModal
onSelect={this.selectCountry}
translation="eng"
>
<View />
</CountryPicker>
modalProps={{ visible: this.state.countryPickerVisible }}
/>
</View>
);
}
+6
View File
@@ -80,6 +80,12 @@ const searchStyle = StyleSheet.create({
loading: {
position: 'absolute',
},
moreLoading: {
width: '100%',
height: 48,
alignItems: 'center',
justifyContent: 'center',
},
});
export default searchStyle;
+1
View File
@@ -31,6 +31,7 @@ const uriBarStyle = StyleSheet.create({
paddingRight: 12,
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
height: 44,
lineHeight: 18,
flex: 17,
},