From: liangzhenying <867174124@qq.com> Date: Wed, 1 Apr 2026 02:35:37 +0000 (+0800) Subject: 改了对话翻译停止逻辑,手动点击停止 X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=9a649b2b5b552b8f0edb0f3124bb5cd3ef417f85;p=mirrors%2FShenYin.git 改了对话翻译停止逻辑,手动点击停止 --- diff --git a/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyDialogTranslateVC.swift b/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyDialogTranslateVC.swift index 2aac8b3..ee0923e 100644 --- a/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyDialogTranslateVC.swift +++ b/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyDialogTranslateVC.swift @@ -220,10 +220,10 @@ extension JoyDialogTranslateVC : JoyGemSIManagerDelegate { } ///监听到一句话结束,自动结束当前录音 - if (model.definite == true) { - toolBar.stopRecord(.phone) - stopPhoneRecord() - } +// if (model.definite == true) { +// toolBar.stopRecord(.phone) +// stopPhoneRecord() +// } guard let model = dataList.last else { return @@ -298,10 +298,10 @@ extension JoyDialogTranslateVC : JoyGemSIDeviceManagerDelegate { } ///监听到一句话结束,自动结束当前录音 - if (model.definite == true) { - toolBar.stopRecord(.earphone) - stopEarRecord() - } +// if (model.definite == true) { +// toolBar.stopRecord(.earphone) +// stopEarRecord() +// } guard let model = dataList.last else { return diff --git a/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyHomeVC.swift b/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyHomeVC.swift index c2f5936..8fb5da3 100644 --- a/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyHomeVC.swift +++ b/ShenYin/ShenYin/Channel/DeepChords/Channel/UI/JoyHomeVC.swift @@ -173,6 +173,7 @@ extension JoyHomeVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollec func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let model = DeviceVM.shared.dataList[indexPath.row] App.shared.goToPage(JoyAiFunctionVC(device: model)) + } func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView{ diff --git a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Contents.json b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Contents.json index ffe9cff..5c4d3b1 100644 --- a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Contents.json +++ b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "Frame@2x(4).png", + "filename" : "Frame@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "Frame@3x(5).png", + "filename" : "Frame@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x(4).png b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x(4).png deleted file mode 100644 index adaeb33..0000000 Binary files a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x(4).png and /dev/null differ diff --git a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x.png b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x.png new file mode 100644 index 0000000..6c6568b Binary files /dev/null and b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@2x.png differ diff --git a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x(5).png b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x(5).png deleted file mode 100644 index 3670036..0000000 Binary files a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x(5).png and /dev/null differ diff --git a/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x.png b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x.png new file mode 100644 index 0000000..a449d16 Binary files /dev/null and b/ShenYin/ShenYin/Channel/DeepChords/DeepChords.xcassets/mine/mine_cell_update.imageset/Frame@3x.png differ diff --git a/ShenYin/ShenYin/Channel/PLAYBOY/Channel/UI/PbDialogTranslateVC.swift b/ShenYin/ShenYin/Channel/PLAYBOY/Channel/UI/PbDialogTranslateVC.swift index 7c37d02..3287b1a 100644 --- a/ShenYin/ShenYin/Channel/PLAYBOY/Channel/UI/PbDialogTranslateVC.swift +++ b/ShenYin/ShenYin/Channel/PLAYBOY/Channel/UI/PbDialogTranslateVC.swift @@ -117,11 +117,11 @@ class PbDialogTranslateVC:BaseVC{ tmpList[msg!] = (model.text,model.index) } - ///监听到一句话结束,自动结束当前录音 - if (model.definite == true) { - toolBar.stopRecord(.phone) - stopPhoneRecord() - } +// ///监听到一句话结束,自动结束当前录音 +// if (model.definite == true) { +// toolBar.stopRecord(.phone) +// stopPhoneRecord() +// } guard let model = dataList.last else { return @@ -205,11 +205,11 @@ class PbDialogTranslateVC:BaseVC{ tmpList[msg!] = (model.text,model.index) } - ///监听到一句话结束,自动结束当前录音 - if (model.definite == true) { - toolBar.stopRecord(.earphone) - stopEarRecord() - } +// ///监听到一句话结束,自动结束当前录音 +// if (model.definite == true) { +// toolBar.stopRecord(.earphone) +// stopEarRecord() +// } guard let model = dataList.last else { return diff --git a/ShenYin/ShenYin/UI/Home/Dialog/DialogRecordBar.swift b/ShenYin/ShenYin/UI/Home/Dialog/DialogRecordBar.swift index 43677b1..2cc581c 100644 --- a/ShenYin/ShenYin/UI/Home/Dialog/DialogRecordBar.swift +++ b/ShenYin/ShenYin/UI/Home/Dialog/DialogRecordBar.swift @@ -156,7 +156,12 @@ class DialogRecordBar: BaseView { } @objc func leftRecordBtnAction(){ - if self.isBusy { + if rightItem.recordItem.activeView.animating || rightItem.recordItem.loadView.animating || leftItem.recordItem.loadView.animating{ + return + } + if leftItem.recordItem.activeView.animating{ + delegate?.recordBar(self, device: .earphone,stateChange: .stop) + stopRecord(.earphone) return } @@ -176,7 +181,12 @@ class DialogRecordBar: BaseView { } } @objc func rightRecordBtnAction(){ - if self.isBusy{ + if leftItem.recordItem.activeView.animating || leftItem.recordItem.loadView.animating || rightItem.recordItem.loadView.animating{ + return + } + if rightItem.recordItem.activeView.animating{ + stopRecord(.phone) + delegate?.recordBar(self, device: .phone,stateChange: .stop) return } diff --git a/ShenYin/ShenYin/UI/common/LoadingButton.swift b/ShenYin/ShenYin/UI/common/LoadingButton.swift index c81cbd8..0910d00 100644 --- a/ShenYin/ShenYin/UI/common/LoadingButton.swift +++ b/ShenYin/ShenYin/UI/common/LoadingButton.swift @@ -127,7 +127,7 @@ class DialogRecordingButton:UIButton{ loadView.isHidden = false loadView.startAnimating() - DispatchQueue.main.asyncAfter(deadline:.now() + 2) { [weak self] in + DispatchQueue.main.asyncAfter(deadline:.now() + 0.3) { [weak self] in self?.loadView.stopAnimating() finished() }