Skip to content
Snippets Groups Projects
Commit 4e501f2a authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Disable image picker for group chats

parent 15501e89
No related branches found
No related tags found
2 merge requests!153Release 1.1.0,!152[Messenger example] group chat
......@@ -16,6 +16,7 @@ public struct ChatView: View {
var failure: String?
var sendFailure: String?
var text: String
var disableImagePicker: Bool
init(state: ChatComponent.State) {
myContactId = state.myContactId
......@@ -23,6 +24,12 @@ public struct ChatView: View {
failure = state.failure
sendFailure = state.sendFailure
text = state.text
switch state.id {
case .contact(_):
disableImagePicker = false
case .group(_):
disableImagePicker = true
}
}
}
......@@ -109,6 +116,7 @@ public struct ChatView: View {
}
}
}
.disabled(viewStore.disableImagePicker)
}
}
.padding()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment