get rid of additional UIHostingController. Cleanup and comments.

This commit is contained in:
David Langley
2022-10-12 14:14:25 +01:00
parent e525bd84f9
commit 89c643734c
9 changed files with 93 additions and 56 deletions
@@ -16,12 +16,33 @@
import Foundation
// MARK: View model
enum ComposerCreateActionListViewModelResult: Equatable {
// The user selected an action
case done(ComposerCreateAction)
}
// MARK: View
struct ComposerCreateActionListViewState: BindableState {
/// The list of composer create actions to display to the user
let actions: [ComposerCreateAction]
}
@objc enum ComposerCreateAction: Int {
/// Upload a photo/video from the media library
case photoLibrary
/// Add a sticker
case stickers
/// Upload an attachment
case attachments
/// Create a Poll
case polls
/// Add a location
case location
/// Upload a photo or video from the camera
case camera
}
@@ -64,11 +85,3 @@ extension ComposerCreateAction {
}
}
}
struct ComposerCreateActionListViewState: BindableState {
let actions: [ComposerCreateAction]
}
enum ComposerCreateActionListViewModelResult: Equatable {
case done(ComposerCreateAction)
}