Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ class ConversationsListActivity : BaseActivity() {
showSnackbar(getString(R.string.send_to_forbidden))
}
} else if (conversation.checkIfVoiceRoom()) {
startACall(false, true)
showStartCallDialog()
} else {
openConversation()
}
Expand Down Expand Up @@ -1215,6 +1215,28 @@ class ConversationsListActivity : BaseActivity() {
)
}

fun showStartCallDialog() {
val dialogBuilder = MaterialAlertDialogBuilder(this)
.setIcon(viewThemeUtils.dialog.colorMaterialAlertDialogIcon(context, R.drawable.ic_call_black_24dp))
.setTitle(R.string.join_call)
.setPositiveButton(R.string.video_call) { _, _ ->
startACall(isVoiceOnlyCall = false, callWithoutNotification = false)
}
.setNegativeButton(R.string.audio_call) { _, _ ->
startACall(isVoiceOnlyCall = true, callWithoutNotification = false)
}
.setNeutralButton(R.string.nc_cancel) { _, _ -> }

viewThemeUtils.dialog
.colorMaterialAlertDialogBackground(this, dialogBuilder)
val dialog = dialogBuilder.show()
viewThemeUtils.platform.colorTextButtons(
dialog.getButton(AlertDialog.BUTTON_POSITIVE),
dialog.getButton(AlertDialog.BUTTON_NEGATIVE),
dialog.getButton(AlertDialog.BUTTON_NEUTRAL)
)
}

private fun showUnauthorizedDialog() {
val dialogBuilder = MaterialAlertDialogBuilder(this)
.setIcon(
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ How to translate with transifex:
<string name="custom">Custom</string>
<string name="set">Set</string>
<string name="calendar">Calendar</string>
<string name="join_call">Join call</string>
<string name="video_call">Video call</string>
<string name="audio_call">Audio call</string>
<string name="started_a_call">started a call</string>
Expand Down
Loading