mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
make a call to endpoint when Add to Notes is clicked
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
98adab723b
commit
31aa56d85c
@ -185,13 +185,13 @@ class MessageActionsDialog(
|
||||
when (state) {
|
||||
is ChatViewModel.NoteToSelfErrorState -> {
|
||||
}
|
||||
ChatViewModel.NoteToSelfStartState -> {
|
||||
is ChatViewModel.NoteToSelfStartState -> {
|
||||
}
|
||||
is ChatViewModel.NoteToSelfSuccessState -> {
|
||||
val roomOverall = state.roomOverall
|
||||
noteToSelfRoomToken = roomOverall.ocs?.data?.token!!
|
||||
chatActivity.shareToNotes(message, noteToSelfRoomToken)
|
||||
}
|
||||
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
@ -473,13 +473,11 @@ class MessageActionsDialog(
|
||||
|
||||
private fun initMenuAddToNote(visible: Boolean) {
|
||||
if (visible) {
|
||||
chatViewModel.checkForNoteToSelf(user!!)
|
||||
dialogMessageActionsBinding.menuShareToNote.setOnClickListener {
|
||||
chatActivity.shareToNotes(message, noteToSelfRoomToken)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
dialogMessageActionsBinding.menuShareToNote.visibility = getVisibility(visible)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user