fix: visibility missing bind back to source issue
This commit is contained in:
parent
81bc8eb662
commit
7e7f41112e
|
@ -334,9 +334,21 @@ extension ComposeContentViewController {
|
|||
viewModel.$isPollActive.assign(to: &composeContentToolbarViewModel.$isPollActive)
|
||||
viewModel.$isEmojiActive.assign(to: &composeContentToolbarViewModel.$isEmojiActive)
|
||||
viewModel.$isContentWarningActive.assign(to: &composeContentToolbarViewModel.$isContentWarningActive)
|
||||
viewModel.$visibility.assign(to: &composeContentToolbarViewModel.$visibility)
|
||||
viewModel.$maxTextInputLimit.assign(to: &composeContentToolbarViewModel.$maxTextInputLimit)
|
||||
viewModel.$contentWeightedLength.assign(to: &composeContentToolbarViewModel.$contentWeightedLength)
|
||||
viewModel.$contentWarningWeightedLength.assign(to: &composeContentToolbarViewModel.$contentWarningWeightedLength)
|
||||
|
||||
// bind back to source due to visibility not update via delegate
|
||||
composeContentToolbarViewModel.$visibility
|
||||
.dropFirst()
|
||||
.sink { [weak self] visibility in
|
||||
guard let self = self else { return }
|
||||
if self.viewModel.visibility != visibility {
|
||||
self.viewModel.visibility = visibility
|
||||
}
|
||||
}
|
||||
.store(in: &disposeBag)
|
||||
}
|
||||
|
||||
private func updateAutoCompleteViewControllerLayout() {
|
||||
|
|
Loading…
Reference in New Issue