Skip to content

Commit d2a3c81

Browse files
committed
fix: Small fixes and improvements
1 parent d4b9298 commit d2a3c81

File tree

7 files changed

+45
-40
lines changed

7 files changed

+45
-40
lines changed

app/mobile/components/OptionsItemTorrent/OptionsItemTorrent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const OptionsItemTorrent = ({
4141
}
4242

4343
return `${torrent.provider} - ${torrent.sizeString}`
44-
}, [download, isItemDisabled])
44+
}, [download, isItemDisabled, torrent])
4545

4646
const subLabel = React.useMemo(() => {
4747
if (!isItemDisabled && download?.status === constants.STATUS_DOWNLOADING) {

app/mobile/screens/Mode/ModeScreen.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ export const Mode = ({ mode, navigation }) => {
7676
)
7777

7878
useBackButton(() => {
79-
if ((query?.trim()?.length > 0 || filter) && navigation.isFocused()) {
79+
if ((query?.trim()?.length > 0 || filter || sort) && navigation.isFocused()) {
8080
setQuery(null)
8181
setFilter(undefined)
82+
setSorting(undefined)
8283

8384
return true
8485
}

app/mobile/screens/Mode/SearchBar/SearchBar.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ export const SearchBar = ({ searchedQuery, search, flatListRef, mode, setSorting
5959
const bottomSheetOptions = React.useMemo(() => {
6060
if (mode === constants.MODE_BOOKMARKS) {
6161
return [
62-
{ label: i18n.t('None'), value: undefined },
63-
{ label: i18n.t('Movies'), value: 'movies' },
64-
{ label: i18n.t('Shows'), value: 'shows' },
62+
{ icon: 'all-inclusive', label: i18n.t('All'), value: undefined },
63+
{ icon: 'movie', label: i18n.t('Movies'), value: 'movies' },
64+
{ icon: 'filmstrip-box-multiple', label: i18n.t('Shows'), value: 'shows' },
6565
]
6666
}
6767

6868
return [
69-
{ label: i18n.t('Default'), value: 'trending' },
70-
{ label: i18n.t('Popularity'), value: 'popularity' },
71-
{ label: i18n.t('Name'), value: 'name' },
72-
{ label: i18n.t('Rating'), value: 'rating' },
73-
{ label: i18n.t('Released'), value: 'released' },
74-
{ label: i18n.t('Year'), value: 'year' },
75-
{ label: i18n.t('Added'), value: 'added' },
69+
{ icon: 'trending-up', label: i18n.t('Trending'), value: 'trending' },
70+
{ icon: 'cards-heart', label: i18n.t('Popularity'), value: 'popularity' },
71+
{ icon: 'alphabetical', label: i18n.t('Name'), value: 'name' },
72+
{ icon: 'star', label: i18n.t('Rating'), value: 'rating' },
73+
{ icon: 'calendar', label: i18n.t('Released'), value: 'released' },
74+
{ icon: 'calendar-range', label: i18n.t('Year'), value: 'year' },
75+
{ icon: 'calendar-plus', label: i18n.t('Added'), value: 'added' },
7676
]
7777
}, [mode])
7878

@@ -147,7 +147,7 @@ export const SearchBar = ({ searchedQuery, search, flatListRef, mode, setSorting
147147
{bottomSheetOptions.map((option) => (
148148
<OptionsItem
149149
key={option.label}
150-
icon={'eye-outline'}
150+
icon={option.icon}
151151
label={option.label}
152152
onPress={handleFilterOrSortPress(option)} />
153153
))}

app/modules/i18n/translations/en.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,7 @@
8383
"Rating": "Rating",
8484
"Released": "Released",
8585
"Year": "Year",
86-
"Added": "Added"
86+
"Added": "Added",
87+
"All": "All",
88+
"Trending": "Trending"
8789
}

app/modules/i18n/translations/nl.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,7 @@
8181
"Rating": "Beoordeling",
8282
"Released": "Uitgebracht",
8383
"Year": "Jaar",
84-
"Added": "Toegevoegd"
84+
"Added": "Toegevoegd",
85+
"All": "Alles",
86+
"Trending": "Trending"
8587
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"test:watch": "yarn test --watch"
2727
},
2828
"dependencies": {
29-
"@apollo/client": "^3.2.3",
29+
"@apollo/client": "^3.2.4",
3030
"@react-native-community/async-storage": "1.12.1",
3131
"@react-native-community/masked-view": "^0.1.10",
3232
"@react-native-community/netinfo": "5.9.7",
@@ -37,14 +37,14 @@
3737
"graphql": "15.3.0",
3838
"graphql-tag": "2.11.0",
3939
"hoist-non-react-statics": "3.3.2",
40-
"i18n-js": "3.7.1",
40+
"i18n-js": "3.8.0",
4141
"jsc-android": "241213.1.0",
4242
"lottie-react-native": "3.5.0",
4343
"prop-types": "^15.7.2",
44-
"react": "16.13.1",
44+
"react": "16.14.0",
4545
"react-native": "0.63.3",
4646
"react-native-animatable": "1.3.3",
47-
"react-native-device-info": "6.2.0",
47+
"react-native-device-info": "6.2.1",
4848
"react-native-fs": "2.16.6",
4949
"react-native-gesture-handler": "1.8.0",
5050
"react-native-google-cast": "github:pct-org/react-native-google-cast#7e409ca7c129d628d5c2902944790bc611b64aaa",

yarn.lock

+21-21
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# yarn lockfile v1
33

44

5-
"@apollo/client@^3.2.3":
6-
version "3.2.3"
7-
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.2.3.tgz#d13e4efa501a1fadefa3cd93e2de99cba2b53999"
8-
integrity sha512-AraRQRG4HinqcsuDtRzuavMuSxkK46TO4zh4zfLLCazMYSYP1xY9E5cQEeUHZ993HQMs4A7tyATPaEMfn8UZfA==
5+
"@apollo/client@^3.2.4":
6+
version "3.2.4"
7+
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.2.4.tgz#d9a308a900bd9e7053348367f66f3962804ed385"
8+
integrity sha512-lfsxKINoc11+g4NQFyKFuxszc/GlecHrxkJYvx/oWkdpscSU5bm/c+BwI/yvk1/E3yfbR7Afi9XIYrt212xrtA==
99
dependencies:
1010
"@graphql-typed-document-node/core" "^3.0.0"
1111
"@types/zen-observable" "^0.8.0"
@@ -14,7 +14,7 @@
1414
fast-json-stable-stringify "^2.0.0"
1515
graphql-tag "^2.11.0"
1616
hoist-non-react-statics "^3.3.2"
17-
optimism "^0.12.1"
17+
optimism "^0.13.0"
1818
prop-types "^15.7.2"
1919
symbol-observable "^2.0.0"
2020
terser "^5.2.0"
@@ -4626,10 +4626,10 @@ [email protected]:
46264626
slash "^3.0.0"
46274627
which-pm-runs "^1.0.0"
46284628

4629-
i18n-js@3.7.1:
4630-
version "3.7.1"
4631-
resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-3.7.1.tgz#c70de6a64dc0ad5d2b6273eecfac636e5ed0421a"
4632-
integrity sha512-xrRzCeda5ZC0u0yRN+dMdidtda0N+f7t7Pek0ajWb+iyKqSGdrMmuBtbNpWJWY5N4Th0cxbp/BR57zSPdrM3Rw==
4629+
i18n-js@3.8.0:
4630+
version "3.8.0"
4631+
resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-3.8.0.tgz#b8fd6b12e1d88cb71f9806c29bca7c31c012e504"
4632+
integrity sha512-hDsGgPuvw/2P+lXSbOafAwspK8Ste8YrwuuUg17W3wEcO1JkQxBlPgsN1t2+852nTnz4YSYTjZc/1nAA2PC/nw==
46334633

46344634
[email protected], iconv-lite@^0.4.17:
46354635
version "0.4.24"
@@ -7016,10 +7016,10 @@ opencollective-postinstall@^2.0.2:
70167016
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
70177017
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
70187018

7019-
optimism@^0.12.1:
7020-
version "0.12.1"
7021-
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.12.1.tgz#933f9467b9aef0e601655adb9638f893e486ad02"
7022-
integrity sha512-t8I7HM1dw0SECitBYAqFOVHoBAHEQBTeKjIL9y9ImHzAVkdyPK4ifTgM4VJRDtTUY4r/u5Eqxs4XcGPHaoPkeQ==
7019+
optimism@^0.13.0:
7020+
version "0.13.0"
7021+
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.13.0.tgz#c08904e1439a0eb9e7f86183dafa06cc715ff351"
7022+
integrity sha512-6JAh3dH+YUE4QUdsgUw8nUQyrNeBKfAEKOHMlLkQ168KhIYFIxzPsHakWrRXDnTO+x61RJrS3/2uEt6W0xlocA==
70237023
dependencies:
70247024
"@wry/context" "^0.5.2"
70257025

@@ -7545,10 +7545,10 @@ [email protected]:
75457545
dependencies:
75467546
prop-types "^15.7.2"
75477547

7548-
7549-
version "6.2.0"
7550-
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-6.2.0.tgz#6eda29dee048b73b29b57b7ec0c21545bd89dada"
7551-
integrity sha512-UtAk/ZAdCVCepEmRNM/3Kx7dWbLwmEPh527HTjoQUQy1utpoXm3y4sYtCrP2tjczSIyeMs5nLP4Wf3c8bc0fwQ==
7548+
7549+
version "6.2.1"
7550+
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-6.2.1.tgz#6b63faeef833d8959d636c0413ccd5066eada2bf"
7551+
integrity sha512-+9Li07jD+7IiSIn9VVmb1YWYfJtgERVMsgO/hG+aUzsFD6uFklpM2TOEBlfKPWP/8J6s8MZgpGfA/Dl1WZrn2g==
75527552

75537553
react-native-fit-image@^1.5.2:
75547554
version "1.5.5"
@@ -7715,10 +7715,10 @@ [email protected], react-test-renderer@^16.0.0-0:
77157715
react-is "^16.8.6"
77167716
scheduler "^0.19.1"
77177717

7718-
react@16.13.1:
7719-
version "16.13.1"
7720-
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
7721-
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
7718+
react@16.14.0:
7719+
version "16.14.0"
7720+
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
7721+
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
77227722
dependencies:
77237723
loose-envify "^1.1.0"
77247724
object-assign "^4.1.1"

0 commit comments

Comments
 (0)