小修改

This commit is contained in:
Fin 2024-04-01 17:41:47 +08:00
parent 60fce59253
commit b36199f21b
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,6 @@ class SoundsViewController: BaseViewController<SoundsViewModel> {
}
return cell
}
} titleForHeaderInSection: { dataSource, section in
return dataSource[section].model
} canEditRowAtIndexPath: { dataSource, indexPath in
@ -176,7 +175,7 @@ extension SoundsViewController: UIDocumentPickerDelegate {
let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: types)
documentPicker.delegate = self
documentPicker.allowsMultipleSelection = false
documentPicker.modalPresentationStyle = .formSheet
documentPicker.modalPresentationStyle = .pageSheet
self.present(documentPicker, animated: true, completion: nil)
} else {
self.showSnackbar(text: "Requires iOS 14")

View File

@ -34,6 +34,7 @@ class SoundsViewModel: ViewModel, ViewModelType {
var soundSelected: Driver<SoundItem>
///
var importSound: Driver<URL>
///
var soundDeleted: Driver<SoundItem>
}
@ -48,7 +49,7 @@ class SoundsViewModel: ViewModel, ViewModelType {
var pickerFile: Driver<Void>
}
/// URL SoundItem
/// URL SoundItem
func getSounds(urls: [URL]) -> [SoundItem] {
let urls = urls.sorted { u1, u2 -> Bool in
u1.lastPathComponent.localizedStandardCompare(u2.lastPathComponent) == ComparisonResult.orderedAscending
@ -92,7 +93,7 @@ class SoundsViewModel: ViewModel, ViewModelType {
self.dependencies.soundFileStorage.deleteSound(url: model.model.url)
}).disposed(by: rx.disposeBag)
//
//
let soundsListUpdated = Observable.merge(
//
Observable.just(()),