Browse Source

提交人:jtm
提交内容:bug fix

江天明 1 year ago
parent
commit
9247d67a82

+ 6 - 0
BusinessAuth/src/main/java/com/develop/auth/ui/MemberForgotFragment.kt

@@ -67,6 +67,12 @@ class MemberForgotFragment : CommonBVMFragment<FragmentMemberForgotBinding, Memb
                 showToast(this)
             }
         }
+        viewModel.sendEmailLiveData.observe(viewLifecycleOwner){
+            dismissPlainDialog()
+            it.msg?.apply {
+                showToast(this)
+            }
+        }
     }
     var dp10 = (com.develop.common.R.dimen.convert_10px).resId2Dimension()
     override fun createViewModel(): MemberViewModel {

+ 2 - 0
BusinessAuth/src/main/java/com/develop/auth/viewmodel/MemberViewModel.kt

@@ -3,6 +3,7 @@ package com.develop.auth.viewmodel
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.scopeNetLife
 import com.develop.base.mvvm.BaseViewModel
+import com.develop.base.util.GlobalToast
 import com.develop.base.util.MMkvUtils
 import com.develop.common.data_repo.FoodDataProvider
 import com.develop.common.data_repo.db.AuthModel
@@ -86,6 +87,7 @@ class MemberViewModel : BaseViewModel() {
             sendEmailLiveData.postValue(AuthModel(true, "Email send"))
         }
     }.catch {
+        GlobalToast.showToast(it.message ?: "Email not send")
         sendEmailLiveData.postValue(AuthModel(false))
     }
 

+ 2 - 3
BusinessCommon/src/main/res/layout/food_content_view.xml

@@ -54,7 +54,6 @@
         android:layout_marginStart="@dimen/convert_22px"
         android:layout_marginTop="@dimen/convert_10px"
         android:layout_marginEnd="@dimen/convert_10px"
-        android:layout_marginBottom="@dimen/convert_10px"
         android:ellipsize="end"
         android:includeFontPadding="false"
         android:singleLine="true"
@@ -71,7 +70,7 @@
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/convert_22px"
         android:layout_marginEnd="@dimen/convert_10px"
-        android:layout_marginBottom="@dimen/convert_15px"
+        android:layout_marginBottom="@dimen/convert_8px"
         android:ellipsize="end"
         android:singleLine="true"
         android:textColor="@color/color_A3A3A2"
@@ -84,7 +83,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/convert_22px"
-        android:layout_marginBottom="@dimen/convert_28px"
+        android:layout_marginBottom="@dimen/convert_20px"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 6 - 2
BusinessSetting/src/main/java/com/develop/setting/ui/LanguageActivity.kt

@@ -113,8 +113,12 @@ class LanguageActivity : BaseBindingActivity<ActivityLanguageBinding>() {
                         }
 //                        navigateTo(Screens.Main.ENTRANCE_CHOSEN)
 //                        finish()
-                        val pm = getSystemService(Context.POWER_SERVICE) as PowerManager
-                        pm.reboot("")
+                       if (!isNightTheme()){
+                           val pm = getSystemService(Context.POWER_SERVICE) as PowerManager
+                           pm.reboot("")
+                       } else if (isFromSetting){
+                           finish()
+                       }
                     }
                 }
 

+ 3 - 3
libBase/src/main/java/com/develop/base/app/BaseApp.kt

@@ -60,9 +60,9 @@ abstract class BaseApp : Application() {
         //host - 请求url的主机名, 该参数会在每次请求时自动和请求路径进行拼接(如果路径包含https/http则不会拼接)
         NetConfig.initialize(createHostUrl(), this) {
             //超时设置
-            connectTimeout(30, TimeUnit.SECONDS)
-            readTimeout(30, TimeUnit.SECONDS)
-            writeTimeout(30, TimeUnit.SECONDS)
+            connectTimeout(15, TimeUnit.SECONDS)
+            readTimeout(15, TimeUnit.SECONDS)
+            writeTimeout(15, TimeUnit.SECONDS)
 
             // 本框架支持Http缓存协议和强制缓存模式
             // 缓存设置, 当超过maxSize最大值会根据最近最少使用算法清除缓存来限制缓存大小