From bd531f2344c181261afaf8c43c96daf569b58f09 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Wed, 8 Nov 2023 13:55:38 -0600
Subject: Pull language methods into api context (#1847)

* Pull language methods into api context

* Rename for consistency
---
 src/view/com/composer/select-language/SelectLangBtn.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/view/com/composer/select-language/SelectLangBtn.tsx')

diff --git a/src/view/com/composer/select-language/SelectLangBtn.tsx b/src/view/com/composer/select-language/SelectLangBtn.tsx
index 6c45f3384..896df041e 100644
--- a/src/view/com/composer/select-language/SelectLangBtn.tsx
+++ b/src/view/com/composer/select-language/SelectLangBtn.tsx
@@ -17,7 +17,7 @@ import {codeToLanguageName} from '../../../../locale/helpers'
 import {useModalControls} from '#/state/modals'
 import {
   useLanguagePrefs,
-  useSetLanguagePrefs,
+  useLanguagePrefsApi,
   toPostLanguages,
   hasPostLanguage,
 } from '#/state/preferences/languages'
@@ -26,7 +26,7 @@ export const SelectLangBtn = observer(function SelectLangBtn() {
   const pal = usePalette('default')
   const {openModal} = useModalControls()
   const langPrefs = useLanguagePrefs()
-  const setLangPrefs = useSetLanguagePrefs()
+  const setLangPrefs = useLanguagePrefsApi()
 
   const onPressMore = useCallback(async () => {
     if (isNative) {
@@ -63,7 +63,7 @@ export const SelectLangBtn = observer(function SelectLangBtn() {
             : ['far', 'circle'],
         label: langName,
         onPress() {
-          setLangPrefs(v => ({...v, postLanguage: commaSeparatedLangCodes}))
+          setLangPrefs.setPostLanguage(commaSeparatedLangCodes)
         },
       })
     }
-- 
cgit 1.4.1

