Ver Fonte

feat: 密码房不计入时长

tongmengxiao há 5 meses atrás
pai
commit
d234d62bcc

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

@@ -307,4 +307,5 @@
     <string name="Load_data_error">خطأ في تحميل البيانات</string>
     <string name="loading">تحميل...</string>
     <string name="modify_success">حفظ بنجاح</string>
+    <string name="Password_rooms_do_not_count_as_hours">أوقات غرفة القفل لم يتم احتسابها في المدة</string>
 </resources>

+ 1 - 1
baseswago/src/main/res/values-in/strings.xml

@@ -311,5 +311,5 @@
     <string name="Load_data_error">Load data error</string>
     <string name="loading">loading...</string>
     <string name="modify_success">Berhasil dimodifikasi</string>
-
+    <string name="Password_rooms_do_not_count_as_hours">Ruang kata sandi tidak tambah durasi</string>
 </resources>

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

@@ -308,4 +308,5 @@
     <string name="Load_data_error">Load data error</string>
     <string name="loading">loading...</string>
     <string name="modify_success">Berhasil dimodifikasi</string>
+    <string name="Password_rooms_do_not_count_as_hours">Ruang kata sandi tidak tambah durasi</string>
 </resources>

+ 4 - 3
baseswago/src/main/res/values-zh/strings.xml

@@ -303,8 +303,9 @@
     <string name="wish_gift">心愿礼物</string>
     <string name="audio">语音</string>
     <string name="Live">视频</string>
-    <string name="There_is_nothing_here">没有数据</string>
-    <string name="Load_data_error">加载失败</string>
-    <string name="loading">加载中。。。</string>
+    <string name="There_is_nothing_here">There is nothing here</string>
+    <string name="Load_data_error">Load data error</string>
+    <string name="loading">loading...</string>
     <string name="modify_success">修改成功</string>
+    <string name="Password_rooms_do_not_count_as_hours">密码房不计入时长</string>
 </resources>

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

@@ -329,4 +329,5 @@
     <string name="Load_data_error">Load data error</string>
     <string name="loading">loading...</string>
     <string name="modify_success">Modify success</string>
+    <string name="Password_rooms_do_not_count_as_hours">Lock room times didn\'t count into</string>
 </resources>

+ 1 - 1
room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt

@@ -296,7 +296,7 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
         }
 
         roomVm.anchorCloseLiveData.observe(this) {
-            anchorCloseDialog = AnchorCloseDialog.newInstance(it,roomType.type)
+            anchorCloseDialog = AnchorCloseDialog.newInstance(it,roomType.type,checkPassword)
             anchorCloseDialog?.show(supportFragmentManager, "AnchorCloseDialog")
         }
 

+ 9 - 1
room/src/main/java/com/swago/room/dialog/AnchorCloseDialog.kt

@@ -3,6 +3,7 @@ package com.swago.room.dialog
 import android.annotation.SuppressLint
 import android.os.Bundle
 import android.view.Gravity
+import android.view.View
 import com.bumptech.glide.Glide
 import com.swago.baseswago.baseroom.SwagoRoomManager
 import com.swago.baseswago.dialog.BaseXDFragment
@@ -23,11 +24,12 @@ class AnchorCloseDialog : BaseXDFragment<DialogAnchorCloseBinding>(){
     private var roomType:Int = 1
 
     companion object{
-        fun newInstance(anchorCloseModel:AnchorClosedModel ,roomType: Int):AnchorCloseDialog{
+        fun newInstance(anchorCloseModel:AnchorClosedModel ,roomType: Int , checkPassword: Boolean):AnchorCloseDialog{
             val dialog = AnchorCloseDialog()
             val bundle = Bundle()
             bundle.putParcelable("model",anchorCloseModel)
             bundle.putInt("roomType",roomType)
+            bundle.putBoolean("checkPassword",checkPassword)
             dialog.arguments = bundle
             return dialog
         }
@@ -47,6 +49,12 @@ class AnchorCloseDialog : BaseXDFragment<DialogAnchorCloseBinding>(){
         arguments?.let {
             anchorCloseModel =  it.getParcelable("model")
             roomType = it.getInt("roomType")
+            val checkPassword = it.getBoolean("checkPassword")
+            if (checkPassword){
+                binding.tvPassword.visibility = View.VISIBLE
+            } else {
+                binding.tvPassword.visibility = View.GONE
+            }
             if (roomType == RoomType.VIDEO.type){
                 binding.tvIncome.text = getString(R.string.income_of_this_live)
                 binding.tvTime.text = getString(R.string.duration_of_this_live)

+ 15 - 2
room/src/main/res/layout/dialog_anchor_close.xml

@@ -59,6 +59,19 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"/>
 
+    <com.swago.baseswago.cusview.RegularTextView
+        android:id="@+id/tvPassword"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tvId"
+        android:layout_marginTop="8dp"
+        android:text="@string/Password_rooms_do_not_count_as_hours"
+        android:textSize="12dp"
+        android:textColor="#DC2626"
+        android:visibility="gone"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+
     <com.swago.baseswago.cusview.MediumTextView
         android:id="@+id/tvIncome"
         android:textSize="16dp"
@@ -190,7 +203,7 @@
         android:textSize="16dp"
         android:textColor="#fff"
         android:text="@string/video_valid_days_this_week"
-        android:layout_marginBottom="80dp"
+        android:layout_marginBottom="60dp"
         android:layout_marginStart="32dp"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintBottom_toTopOf="@+id/tvClose"
@@ -202,7 +215,7 @@
         android:textSize="16dp"
         android:textColor="#fff"
         tools:text="100"
-        android:layout_marginBottom="80dp"
+        android:layout_marginBottom="60dp"
         android:layout_marginEnd="32dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintBottom_toTopOf="@+id/tvClose"

+ 1 - 1
room/src/main/res/layout/dialog_house_go_live.xml

@@ -55,7 +55,7 @@
         android:layout_marginEnd="20dp"
         android:textColor="#fff"
         android:textSize="@dimen/sp_16"
-        android:text="@string/start_live"
+        android:text="@string/ok"
         android:gravity="center"
         android:layout_marginBottom="30dp"
         android:layout_marginStart="30dp"