mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-27 01:20:32 +00:00
Handle uncached attachments
This commit is contained in:
parent
b2e56a1b9b
commit
45820517e9
|
@ -329,7 +329,11 @@ public extension StatusViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
func attachmentSelected(viewModel: AttachmentViewModel) {
|
func attachmentSelected(viewModel: AttachmentViewModel) {
|
||||||
eventsSubject.send(Just(.attachment(viewModel, self)).setFailureType(to: Error.self).eraseToAnyPublisher())
|
if viewModel.attachment.type == .unknown, let remoteUrl = viewModel.attachment.remoteUrl {
|
||||||
|
urlSelected(remoteUrl)
|
||||||
|
} else {
|
||||||
|
eventsSubject.send(Just(.attachment(viewModel, self)).setFailureType(to: Error.self).eraseToAnyPublisher())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func shareStatus() {
|
func shareStatus() {
|
||||||
|
|
|
@ -177,8 +177,10 @@ private extension AttachmentView {
|
||||||
playImageView.image = UIImage(systemName: "waveform.circle",
|
playImageView.image = UIImage(systemName: "waveform.circle",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(textStyle: .largeTitle))
|
withConfiguration: UIImage.SymbolConfiguration(textStyle: .largeTitle))
|
||||||
backgroundColor = .secondarySystemBackground
|
backgroundColor = .secondarySystemBackground
|
||||||
default:
|
case .unknown:
|
||||||
break
|
playImageView.image = UIImage(systemName: "link",
|
||||||
|
withConfiguration: UIImage.SymbolConfiguration(textStyle: .largeTitle))
|
||||||
|
backgroundColor = .secondarySystemBackground
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
|
|
Loading…
Reference in a new issue