mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Clean
This commit is contained in:
parent
8491c6d78d
commit
9f1809abf4
@ -83,7 +83,7 @@ class PNModeActivity : BaseActionBarActivity() {
|
||||
private fun register() {
|
||||
if (selectedOptionView == null) {
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
dialog.setMessage(R.string.activity_pn_mode_no_option_picked_dialog_title)
|
||||
dialog.setTitle(R.string.activity_pn_mode_no_option_picked_dialog_title)
|
||||
dialog.setPositiveButton(R.string.ok) { _, _ -> }
|
||||
dialog.create().show()
|
||||
return
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms.loki.redesign.dialogs
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.drawable.TransitionDrawable
|
||||
import android.os.Bundle
|
||||
@ -31,7 +32,7 @@ class PNModeBottomSheet : BottomSheetDialogFragment() {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
fcmOptionView.setOnClickListener { toggleFCM() }
|
||||
backgroundPollingOptionView.setOnClickListener { toggleBackgroundPolling() }
|
||||
confirmButton.setOnClickListener { onConfirmTapped?.invoke(selectedOptionView == fcmOptionView) }
|
||||
confirmButton.setOnClickListener { confirm() }
|
||||
skipButton.setOnClickListener { onSkipTapped?.invoke() }
|
||||
}
|
||||
|
||||
@ -84,4 +85,16 @@ class PNModeBottomSheet : BottomSheetDialogFragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun confirm() {
|
||||
if (selectedOptionView == null) {
|
||||
val dialog = AlertDialog.Builder(context)
|
||||
dialog.setTitle(R.string.sheet_pn_mode_no_option_picked_dialog_title)
|
||||
dialog.setPositiveButton(R.string.ok) { _, _ -> }
|
||||
dialog.create().show()
|
||||
return
|
||||
}
|
||||
onConfirmTapped?.invoke(selectedOptionView == fcmOptionView)
|
||||
}
|
||||
// endregion
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user