mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-17 21:38:29 +00:00
Fixed sharing logs to contact shortcut
This commit is contained in:
parent
c9f052f39c
commit
498d903548
1 changed files with 20 additions and 20 deletions
|
|
@ -548,6 +548,26 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
sharedViewModel.textToShareFromIntent.observe(viewLifecycleOwner) { text ->
|
||||
if (text.isNotEmpty() && sharedViewModel.displayedChatRoom != null) {
|
||||
Log.i("$TAG Found text to share from intent")
|
||||
sendMessageViewModel.textToSend.value = text
|
||||
|
||||
sharedViewModel.textToShareFromIntent.value = ""
|
||||
}
|
||||
}
|
||||
|
||||
sharedViewModel.filesToShareFromIntent.observe(viewLifecycleOwner) { files ->
|
||||
if (files.isNotEmpty() && sharedViewModel.displayedChatRoom != null) {
|
||||
Log.i("$TAG Found [${files.size}] files to share from intent")
|
||||
for (path in files) {
|
||||
sendMessageViewModel.addAttachments(arrayListOf(path))
|
||||
}
|
||||
|
||||
sharedViewModel.filesToShareFromIntent.value = arrayListOf()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1001,26 +1021,6 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
sharedViewModel.textToShareFromIntent.observe(viewLifecycleOwner) { text ->
|
||||
if (text.isNotEmpty() && sharedViewModel.displayedChatRoom != null) {
|
||||
Log.i("$TAG Found text to share from intent")
|
||||
sendMessageViewModel.textToSend.value = text
|
||||
|
||||
sharedViewModel.textToShareFromIntent.value = ""
|
||||
}
|
||||
}
|
||||
|
||||
sharedViewModel.filesToShareFromIntent.observe(viewLifecycleOwner) { files ->
|
||||
if (files.isNotEmpty()) {
|
||||
Log.i("$TAG Found [${files.size}] files to share from intent")
|
||||
for (path in files) {
|
||||
sendMessageViewModel.addAttachments(arrayListOf(path))
|
||||
}
|
||||
|
||||
sharedViewModel.filesToShareFromIntent.value = arrayListOf()
|
||||
}
|
||||
}
|
||||
|
||||
sharedViewModel.forceRefreshConversationInfoEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Force refreshing conversation info")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue