kunfei 4 лет назад
Родитель
Сommit
9f9fc4342c

+ 2 - 0
app/src/main/java/io/legado/app/ui/replace/edit/ReplaceEditActivity.kt

@@ -97,6 +97,7 @@ class ReplaceEditActivity :
         cbScopeTitle.isChecked = replaceRule.scopeTitle
         cbScopeContent.isChecked = replaceRule.scopeContent
         etScope.setText(replaceRule.scope)
+        etTimeout.setText(replaceRule.timeoutMillisecond.toString())
     }
 
     private fun getReplaceRule(): ReplaceRule = binding.run {
@@ -109,6 +110,7 @@ class ReplaceEditActivity :
         replaceRule.scopeTitle = cbScopeTitle.isChecked
         replaceRule.scopeContent = cbScopeContent.isChecked
         replaceRule.scope = etScope.text.toString()
+        replaceRule.timeoutMillisecond = etTimeout.text.toString().toLong()
         return replaceRule
     }
 

+ 14 - 0
app/src/main/res/layout/activity_replace_edit.xml

@@ -139,6 +139,20 @@
                     tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
             </io.legado.app.ui.widget.text.TextInputLayout>
 
+            <io.legado.app.ui.widget.text.TextInputLayout
+                android:id="@+id/til_timeout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:hint="@string/timeout_millisecond">
+
+                <io.legado.app.lib.theme.view.ThemeEditText
+                    android:id="@+id/et_timeout"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:inputType="number"
+                    tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
+            </io.legado.app.ui.widget.text.TextInputLayout>
+
         </LinearLayout>
     </androidx.core.widget.NestedScrollView>
 

+ 1 - 0
app/src/main/res/values-es-rES/strings.xml

@@ -973,5 +973,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

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

@@ -976,5 +976,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

+ 1 - 0
app/src/main/res/values-pt-rBR/strings.xml

@@ -976,5 +976,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

+ 1 - 0
app/src/main/res/values-zh-rHK/strings.xml

@@ -973,5 +973,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

+ 1 - 0
app/src/main/res/values-zh-rTW/strings.xml

@@ -975,5 +975,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

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

@@ -975,5 +975,6 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
     <!-- string end -->
 </resources>

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

@@ -976,6 +976,7 @@
     <string name="soure_change_source">是否确认换源</string>
     <string name="input_verification_code">输入验证码</string>
     <string name="verification_code">验证码</string>
+    <string name="timeout_millisecond">超时毫秒数</string>
 
 
     <!-- string end -->