修复样片详情解析并优化列表上下架交互。

兼容 Android 媒体项 size 字段格式,增强灵活解码容错,并统一样片列表开关确认逻辑与安全区布局。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-13 15:14:40 +08:00
parent afcd412f11
commit 07b2b9d459
7 changed files with 96 additions and 47 deletions

View File

@ -138,7 +138,7 @@ final class UploadSampleViewController: SampleBaseViewController {
make.trailing.equalToSuperview().inset(15)
}
scrollView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide)
make.leading.trailing.equalTo(view.safeAreaLayoutGuide)
make.bottom.equalTo(bottomBar.snp.top)
}
@ -698,6 +698,10 @@ private final class SampleUploadThumbView: UIControl {
deleteButton.layer.cornerRadius = 10
playIcon.tintColor = .white
playIcon.isHidden = true
[imageView, addCircle, addIcon, textLabel, playIcon].forEach {
$0.isUserInteractionEnabled = false
}
accessibilityLabel = mediaType == .image ? "上传图片" : "上传视频"
addSubview(imageView)
addSubview(addCircle)
@ -828,6 +832,10 @@ private final class SampleCoverUploadView: UIControl {
hintLabel.font = .systemFont(ofSize: 12)
hintLabel.textColor = UIColor(hex: 0xB6BECA)
hintLabel.textAlignment = .center
[imageView, addCircle, addIcon, titleLabel, hintLabel].forEach {
$0.isUserInteractionEnabled = false
}
accessibilityLabel = "上传封面图片"
deleteButton.setImage(UIImage(named: "material_ic_clear"), for: .normal)
deleteButton.tintColor = .white
deleteButton.backgroundColor = UIColor.black.withAlphaComponent(0.6)