Prechádzať zdrojové kódy

fix: 修复欢迎语被拒绝后 UI 展示异常的问题

陈文艺 4 týždňov pred
rodič
commit
fdc90dfae3

+ 46 - 0
Lanu/Localizable.xcstrings

@@ -10230,6 +10230,52 @@
         }
       }
     },
+    "B00126" : {
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "As long as I have fun, I can play any mode"
+          }
+        },
+        "id" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Asyik, main mode apa saja"
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "开心就好,随便玩"
+          }
+        }
+      }
+    },
+    "B00127" : {
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Reason for rejection"
+          }
+        },
+        "id" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Alasan penolakan"
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "拒绝原因"
+          }
+        }
+      }
+    },
     "C00001" : {
       "extractionState" : "manual",
       "localizations" : {

+ 6 - 4
Lanu/Views/Game/OrderCenter/AutoReply/Edit/LNAutoReplyEditViewController.swift

@@ -44,8 +44,6 @@ class LNAutoReplyEditViewController: LNViewController {
         voiceEdit.isHidden = true
         rejectView.isHidden = true
         
-        commitButton.isEnabled = false
-        commitButton.setBackgroundImage(nil, for: .normal)
         titleLabel.text = .init(key: "B00114", num + 1)
         
         switch item.type {
@@ -56,6 +54,9 @@ class LNAutoReplyEditViewController: LNViewController {
             voiceEdit.isHidden = false
             voiceEdit.update(item.voiceUrl, duration: item.voiceDuration)
         }
+        
+        commitButton.isEnabled = false
+        commitButton.setBackgroundImage(nil, for: .normal)
         switch item.status {
         case .pass:
             commitButton.setTitle(.init(key: "A00240"), for: .normal)
@@ -106,7 +107,7 @@ extension LNAutoReplyEditViewController {
         case .text:
             textEdit.text.isEmpty == false && textEdit.text != curItem?.textContent
         case .voice:
-            voiceEdit.voiceInfo.0 != nil && voiceEdit.voiceInfo.1 > 0
+            voiceEdit.voiceInfo.0 != nil && voiceEdit.voiceInfo.1 > 0 && voiceEdit.voiceInfo.0 != curItem?.voiceUrl
         case nil:
             false
         }
@@ -222,7 +223,7 @@ extension LNAutoReplyEditViewController {
         
         textEdit.delegate = self
         textEdit.maxInput = 200
-        textEdit.placeholderLabel.text = .init(key: "As long as I have fun, I can play any mode")
+        textEdit.placeholderLabel.text = .init(key: "B00126")
         textEdit.snp.makeConstraints { make in
             make.height.equalTo(150)
         }
@@ -239,6 +240,7 @@ extension LNAutoReplyEditViewController {
         rejectView.backgroundColor = .fill
         
         let titleLabel = UILabel()
+        titleLabel.text = .init(key: "B00127")
         titleLabel.font = .heading_h4
         titleLabel.textColor = .text_5
         rejectView.addSubview(titleLabel)