From 63b49abfab1a4f7f521c23743c585b3a756197ad Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Mon, 12 Jun 2023 11:38:57 -0300 Subject: [PATCH] minor tweaks --- app/lib/methods/userPreferences.ts | 4 ---- app/lib/store/internetStateMiddleware.ts | 3 --- app/views/MediaAutoDownloadView/ListPicker.tsx | 2 ++ 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/lib/methods/userPreferences.ts b/app/lib/methods/userPreferences.ts index f996c0da3..18c3800f9 100644 --- a/app/lib/methods/userPreferences.ts +++ b/app/lib/methods/userPreferences.ts @@ -14,10 +14,6 @@ class UserPreferences { this.mmkv = MMKV; } - getMMKV() { - return this.mmkv; - } - getString(key: string) { try { return (this.mmkv.getString(key) as T) ?? null; diff --git a/app/lib/store/internetStateMiddleware.ts b/app/lib/store/internetStateMiddleware.ts index 104a2aa05..430ca8403 100644 --- a/app/lib/store/internetStateMiddleware.ts +++ b/app/lib/store/internetStateMiddleware.ts @@ -6,16 +6,13 @@ export default () => (createStore: any) => (...args: any) => { const store = createStore(...args); - let currentType: NetInfoStateType | undefined; - const handleInternetStateChange = (nextState: NetInfoState) => { if (nextState.type !== currentType) { store.dispatch(setInternetType(nextState.type)); currentType = nextState.type; } }; - NetInfo.addEventListener(handleInternetStateChange); return store; }; diff --git a/app/views/MediaAutoDownloadView/ListPicker.tsx b/app/views/MediaAutoDownloadView/ListPicker.tsx index d9eedabb3..53de97712 100644 --- a/app/views/MediaAutoDownloadView/ListPicker.tsx +++ b/app/views/MediaAutoDownloadView/ListPicker.tsx @@ -65,6 +65,8 @@ const ListPicker = ({ onPress={() => showActionSheet({ options: getOptions() })} right={() => ( + {/* when picking an option the label should be Never + but when showing among the other settings the label should be Off */} {option.label === 'Never' ? I18n.t('Off') : I18n.t(option.label)} )}