wbspool 1 rok pred
rodič
commit
66ec34d699

+ 186 - 0
BusinessAirFryer/src/main/assets/lang_config_010.json

@@ -0,0 +1,186 @@
+{
+  "langs": [
+    {
+      "name": "Polish(波兰语)",
+      "value": "PL",
+      "icon": "icon_lang_pl",
+      "showName": "Polski",
+      "show": false
+    },
+    {
+      "name": "German(德语)",
+      "value": "DE",
+      "icon": "icon_lang_de",
+      "showName": "Deutsch",
+      "show": false
+    },
+    {
+      "name": "French(法语)",
+      "value": "FR",
+      "icon": "icon_lang_fr",
+      "showName": "Français",
+      "show": true
+    },
+    {
+      "name": "Dutch(荷兰语)",
+      "value": "NL",
+      "icon": "icon_lang_nl",
+      "showName": "Nederlands",
+      "show": false
+    },
+    {
+      "name": "Portuguese(葡萄牙语)",
+      "value": "PT",
+      "icon": "icon_lang_pt",
+      "showName": "Português",
+      "show": false
+    },
+    {
+      "name": "Spanish(西班牙语)",
+      "value": "ES",
+      "icon": "icon_lang_es",
+      "showName": "Español",
+      "show": false
+    },
+    {
+      "name": "Italiano(意大利语)",
+      "value": "IT",
+      "icon": "icon_lang_it",
+      "showName": "Italiano",
+      "show": false
+    },
+    {
+      "name": "English(英语)",
+      "value": "EN",
+      "icon": "icon_lang_en",
+      "showName": "English",
+      "show": false
+    },
+    {
+      "name": "Greek(希腊语)",
+      "value": "GR",
+      "icon": "icon_lang_gr",
+      "showName": "Ελληνικά",
+      "show": false
+    },
+    {
+      "name": "Russian(俄语)",
+      "value": "RU",
+      "icon": "icon_lang_ru",
+      "showName": "Русский",
+      "show": false
+    },
+    {
+      "name": "Romanian(罗马尼亚语)",
+      "value": "RO",
+      "icon": "icon_lang_ro",
+      "showName": "Română",
+      "show": false
+    },
+    {
+      "name": "Finnish(芬兰语)",
+      "value": "FI",
+      "icon": "icon_lang_fi",
+      "showName": "Suomi",
+      "show": false
+    },
+    {
+      "name": "Norsk(挪威语)",
+      "value": "NO",
+      "icon": "icon_lang_no",
+      "showName": "Norsk",
+      "show": false
+    },
+    {
+      "name": "Swedish(瑞典语)",
+      "value": "SE",
+      "icon": "icon_lang_se",
+      "showName": "Svenska",
+      "show": false
+    },
+    {
+      "name": "Danish(丹麦语)",
+      "value": "DK",
+      "icon": "icon_lang_dk",
+      "showName": "Dansk",
+      "show": false
+    },
+    {
+      "name": "Czech(捷克语)",
+      "value": "CZ",
+      "icon": "icon_lang_cz",
+      "showName": "Čeština",
+      "show": false
+    },
+    {
+      "name": "Estonki(爱沙尼亚语)",
+      "value": "EE",
+      "icon": "icon_lang_ee",
+      "showName": "Eesti keel",
+      "show": false
+    },
+    {
+      "name": "Slovak(斯洛伐克语)",
+      "value": "SK",
+      "icon": "icon_lang_sk",
+      "showName": "Slovenčina",
+      "show": false
+    },
+    {
+      "name": "Ukrainian(乌克兰语)",
+      "value": "UK",
+      "icon": "icon_lang_uk",
+      "showName": "Українська",
+      "show": false
+    },
+    {
+      "name": "Arabic(阿拉伯语)",
+      "value": "AR",
+      "icon": "icon_lang_ar",
+      "showName": "العربية",
+      "show": false
+    },
+    {
+      "name": "Lithuanian(立陶宛语)",
+      "value": "LT",
+      "icon": "icon_lang_lt",
+      "showName": "Lietuvių kalba",
+      "show": false
+    },
+    {
+      "name": "Farsi(波斯语)",
+      "value": "IR",
+      "icon": "icon_lang_ir",
+      "showName": "فارسی",
+      "show": false
+    },
+    {
+      "name": "Kazakh(哈萨克语)",
+      "value": "KZ",
+      "icon": "icon_lang_kz",
+      "showName": "Қазақша",
+      "show": false
+    },
+    {
+      "name": "Chinese(中文)",
+      "value": "ZH",
+      "icon": "icon_lang_zh",
+      "showName": "中文",
+      "show": false
+    },
+    {
+      "name": "Japanese(日语)",
+      "value": "JA",
+      "icon": "icon_lang_ja",
+      "showName": "日本語",
+      "show": false
+    },
+    {
+      "name": "Hungarian(匈牙利语)",
+      "value": "HU",
+      "icon": "icon_lang_hu",
+      "showName": "magyar nyelv",
+      "show": false
+    }
+  ]
+}

+ 2 - 2
BusinessAirFryer/src/main/assets/lang_config_030.json

@@ -19,7 +19,7 @@
       "value": "FR",
       "icon": "icon_lang_fr",
       "showName": "Français",
-      "show": true
+      "show": false
     },
     {
       "name": "Dutch(荷兰语)",
@@ -54,7 +54,7 @@
       "value": "EN",
       "icon": "icon_lang_en",
       "showName": "English",
-      "show": false
+      "show": true
     },
     {
       "name": "Greek(希腊语)",

+ 6 - 4
BusinessAuth/src/main/java/com/develop/auth/ui/MemberProfileFragment.kt

@@ -45,7 +45,9 @@ class MemberProfileFragment : CommonBVMFragment<FragmentMemberProfileBinding, Me
         viewModel.queryUserInfo()
         binding.tvChooseAge.setOnClickListener {
             AgeSelectDialog(hostActivity) { index, change ->
-                selectAge = index + 20
+                if (index != 0) {
+                    selectAge = index + 20
+                }
                 binding.tvChooseAge.text = selectAge.toString()
                 binding.tvChooseAge.setTextColor(Color.BLACK)
             }.showDialog(childFragmentManager, "AgeSelectDialog")
@@ -102,7 +104,7 @@ class MemberProfileFragment : CommonBVMFragment<FragmentMemberProfileBinding, Me
             userInfoLiveData.observe(viewLifecycleOwner) {
                 it?.apply {
                     selectAge = userAge
-                    selectGender = userGender?.toInt() ?: 2
+                    selectGender = userGender?.toInt() ?: 0
                     binding.etNickname.setText(userName ?: "")
                     viewModel.chooseAvatar.value = userAvatar?.toInt()
                     when (selectGender) {
@@ -149,7 +151,7 @@ class MemberProfileFragment : CommonBVMFragment<FragmentMemberProfileBinding, Me
                 val chooseIcon = icons.getOrNull(it ?: 0) ?: com.develop.common.R.drawable.ic_icon1
                 binding.ivMember.setImageResource(chooseIcon)
             }
-            cancelAccountLiveData.observe(viewLifecycleOwner){
+            cancelAccountLiveData.observe(viewLifecycleOwner) {
                 dismissPlainDialog()
                 FoodDataProvider
                     .getUserDatabase()
@@ -179,7 +181,7 @@ class MemberProfileFragment : CommonBVMFragment<FragmentMemberProfileBinding, Me
         nickname: String?, age: Int, sex: Int, portrait: Int
     ) {
         if (nickname.isNullOrEmpty()) {
-            showToast("Please fill in nickname")
+            showToast(getString(com.develop.common.R.string.please_fill_in_nickname))
             return
         }
 //        if (age == 0) {

+ 1 - 0
BusinessCommon/src/main/java/com/develop/common/dialog/AgeSelectDialog.kt

@@ -53,6 +53,7 @@ class AgeSelectDialog(
 
     private fun createAgeListData(): List<String> {
         val list = mutableListOf<String>()
+        list.add(0,"0")
         for (index in 20..80) {
             list.add(index.toString())
         }

+ 2 - 0
BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt

@@ -29,6 +29,7 @@ import com.develop.common.data_repo.net.model.response.RecipeDataConfig
 import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.dialog.CommonDialog
 import com.develop.common.dialog.RecipeUpdateDialog
+import com.develop.common.event.RefreshDataEvent
 import com.develop.common.tag.SCREENSAVER
 import com.drake.net.Get
 import com.drake.net.Post
@@ -321,6 +322,7 @@ object AppVersionUtil {
                 contentResolver.notifyChange(uri, null)
             }
             EventBus.getDefault().post(NoScreenEvent(false))
+            EventBus.getDefault().post(RefreshDataEvent())
             RecipeUpdateDialog().apply {
                 onDialogClickListener = object : RecipeUpdateDialog.OnDialogClickListener {
                     override fun onConfirm() {

+ 1 - 0
BusinessCommon/src/main/res/values-cz/strings.xml

@@ -210,4 +210,5 @@ neshromažďujeme žádné vaše osobní údaje.</string>
     <string name="wight">HMOTNOST</string>
     <string name="running_block_tips">Zastavte běžící program a spusťte nový.</string>
     <string name="unset_target_time">Čas nebyl nastaven.</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-en/strings.xml

@@ -234,4 +234,5 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="enjoy_your_meal_desc">enjoy your meal</string>
     <string name="wrong_captcha">Wrong captcha</string>
     <string name="none">None</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-fr/strings.xml

@@ -288,4 +288,5 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="wrong_captcha">Wrong captcha</string>
     <string name="frement_010d_stage_first_finish">Ajoutez un film étirable dans le fond du panier vapeur puis disposez vos pots de yaourt. Fermez le couvercle et couvrez avec un linge ou un torchon.</string>
     <string name="none">None</string>
+    <string name="please_fill_in_nickname">Veuillez remplir le pseudonyme</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-hu/strings.xml

@@ -211,4 +211,5 @@
     <string name="wight">SÚLY</string>
     <string name="running_block_tips">Állítsa le a futó programot, és indítson el egy újat.</string>
     <string name="unset_target_time">Az idő nem lett beállítva.</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-ja/strings.xml

@@ -159,4 +159,5 @@
     <string name="enjoy_your_meal">ENJOY YOUR MEAL</string>
     <string name="wrong_captcha">Wrong captcha</string>
     <string name="none">None</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-sk/strings.xml

@@ -211,4 +211,5 @@
     <string name="wight">HMOTNOSŤ</string>
     <string name="running_block_tips">Zastavte spustený program a spustite nový program.</string>
     <string name="unset_target_time">Čas nebol nastavený.</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values-zh-rCN/strings.xml

@@ -297,4 +297,5 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="no_login">Veuillez saisir les champs ci-dessus pour vous connecter</string>
     <string name="wrong_captcha">Wrong captcha</string>
     <string name="none">None</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values/strings.xml

@@ -312,4 +312,5 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="wrong_captcha">Wrong captcha</string>
     <string name="frement_010d_stage_first_finish">Place a sheet of plastic wrap at the bottom of the steaming basket, then arrange your yogurt pots. Close the lid and cover with a cloth or a towel.</string>
     <string name="none">None</string>
+    <string name="please_fill_in_nickname">Please fill in nickname</string>
 </resources>

+ 17 - 15
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt

@@ -262,6 +262,8 @@ class CookStepActivity : CookStepBaseActivity() {
             coverPath = FoodDataProvider.getImagePath(it.source.photoVideoFilePath)
             currModes = it.workMode
             if (it.workMode == "Final Step") {
+                binding.viewWeightClose1.setGone()
+                binding.viewWeightClose.setGone()
                 val stepCount = viewModel.getStepCount()
                 val stepIndex = viewModel.allSteps.indexOf(it)
                 changeDescription()
@@ -402,16 +404,18 @@ class CookStepActivity : CookStepBaseActivity() {
             title = ctx.getString(R.string.keep_cooking_in_the_background)
             onDialogClickListener = object : CancelConfirmDialog.OnDialogClickListener {
                 override fun onConfirm() {
-                    val info = CofarSDK.devInfo().runningInstId.split(":");
-
-                    val cookStepEvent = CookStepEvent(
-                        info[0],
-                        coverPath as String,
-                        info[1].toInt(),
-                        isMode = false
-                    )
-                    FloatWindowManager.showStepFlowWindow(cookStepEvent)
-                    finish()
+                    if (CofarSDK.devInfo().runningInstId != null) {
+                        val info = CofarSDK.devInfo().runningInstId.split(":");
+
+                        val cookStepEvent = CookStepEvent(
+                            info[0],
+                            coverPath as String,
+                            info[1].toInt(),
+                            isMode = false
+                        )
+                        FloatWindowManager.showStepFlowWindow(cookStepEvent)
+                        finish()
+                    }
                 }
 
                 override fun onCancel() {
@@ -615,11 +619,9 @@ class CookStepActivity : CookStepBaseActivity() {
         } else if (tag == BUTTON_TAG_RESET) {
             val current = viewModel.displayStep() ?: return
             val stepIndex = viewModel.allSteps.indexOf(current)
-            val uiCopy = viewModel.dataCopy.getOrNull(stepIndex)
-            uiCopy?.let {
-                current.uiData.copyFrom(it)
-                updateUiSetting(current)
-            }
+            viewModel.stepIndex = stepIndex
+            initStepData()
+
         } else if (tag == BUTTON_TAG_CANCEL) {
             CofarSDK.cancel()
             val uiData = viewModel.displayStep()?.uiData

+ 1 - 0
app/build.gradle

@@ -14,6 +14,7 @@ ext{
 //    versionCode=230617180
     brandCode="000A"
     model="5037"
+
 }