feat: fulfill the content warning when compose reply post
This commit is contained in:
parent
81a1028f20
commit
4041929b3e
|
@ -77,6 +77,7 @@ extension ComposeStatusSection {
|
|||
return cell
|
||||
case .input(let replyToStatusObjectID, let attribute):
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ComposeStatusContentCollectionViewCell.self), for: indexPath) as! ComposeStatusContentCollectionViewCell
|
||||
cell.statusContentWarningEditorView.textView.text = attribute.contentWarningContent.value
|
||||
cell.textEditorView.text = attribute.composeContent.value ?? ""
|
||||
managedObjectContext.perform {
|
||||
guard let replyToStatusObjectID = replyToStatusObjectID,
|
||||
|
|
|
@ -112,6 +112,10 @@ final class ComposeViewModel {
|
|||
for acct in mentionAccts {
|
||||
UITextChecker.learnWord(acct)
|
||||
}
|
||||
if let spoilerText = status.spoilerText, !spoilerText.isEmpty {
|
||||
self.isContentWarningComposing.value = true
|
||||
self.composeStatusAttribute.contentWarningContent.value = spoilerText
|
||||
}
|
||||
|
||||
let initialComposeContent = mentionAccts.joined(separator: " ")
|
||||
let preInsertedContent: String? = initialComposeContent.isEmpty ? nil : initialComposeContent + " "
|
||||
|
|
Loading…
Reference in New Issue