feat: 接通图片预览 AI 修图流程
This commit is contained in:
@@ -7,7 +7,7 @@ import Kingfisher
|
||||
import SnapKit
|
||||
import UIKit
|
||||
|
||||
/// AI 修图模板选择 Sheet,展示三类横向模板列表、修图模式与固定底部操作。
|
||||
/// AI 修图模板选择 Sheet,按工作流展示所需横向模板列表与固定底部操作。
|
||||
final class TravelAlbumAIRetouchTemplateViewController: BaseViewController {
|
||||
/// 页面使用的 collection section。
|
||||
private enum Section: Hashable {
|
||||
@@ -276,7 +276,7 @@ final class TravelAlbumAIRetouchTemplateViewController: BaseViewController {
|
||||
withReuseIdentifier: TravelAlbumAIRetouchSectionHeader.reuseIdentifier,
|
||||
for: indexPath
|
||||
) as! TravelAlbumAIRetouchSectionHeader
|
||||
header.apply(title: category.title, optional: category == .atmosphere)
|
||||
header.apply(title: category.title, optional: self.viewModel.isOptional(category))
|
||||
return header
|
||||
}
|
||||
}
|
||||
@@ -359,10 +359,8 @@ final class TravelAlbumAIRetouchTemplateViewController: BaseViewController {
|
||||
|
||||
private func applySnapshot() {
|
||||
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
|
||||
appendTemplates(.refined, to: &snapshot)
|
||||
appendTemplates(.atmosphere, to: &snapshot)
|
||||
if viewModel.showsCoverTemplates {
|
||||
appendTemplates(.cover, to: &snapshot)
|
||||
for category in viewModel.visibleCategories {
|
||||
appendTemplates(category, to: &snapshot)
|
||||
}
|
||||
snapshot.appendSections([.mode])
|
||||
snapshot.appendItems([.mode], toSection: .mode)
|
||||
|
||||
Reference in New Issue
Block a user