mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Clean
This commit is contained in:
parent
8491c6d78d
commit
9f1809abf4
@ -83,7 +83,7 @@ class PNModeActivity : BaseActionBarActivity() {
|
|||||||
private fun register() {
|
private fun register() {
|
||||||
if (selectedOptionView == null) {
|
if (selectedOptionView == null) {
|
||||||
val dialog = AlertDialog.Builder(this)
|
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.setPositiveButton(R.string.ok) { _, _ -> }
|
||||||
dialog.create().show()
|
dialog.create().show()
|
||||||
return
|
return
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.thoughtcrime.securesms.loki.redesign.dialogs
|
package org.thoughtcrime.securesms.loki.redesign.dialogs
|
||||||
|
|
||||||
|
import android.app.AlertDialog
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.graphics.drawable.TransitionDrawable
|
import android.graphics.drawable.TransitionDrawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
@ -31,7 +32,7 @@ class PNModeBottomSheet : BottomSheetDialogFragment() {
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
fcmOptionView.setOnClickListener { toggleFCM() }
|
fcmOptionView.setOnClickListener { toggleFCM() }
|
||||||
backgroundPollingOptionView.setOnClickListener { toggleBackgroundPolling() }
|
backgroundPollingOptionView.setOnClickListener { toggleBackgroundPolling() }
|
||||||
confirmButton.setOnClickListener { onConfirmTapped?.invoke(selectedOptionView == fcmOptionView) }
|
confirmButton.setOnClickListener { confirm() }
|
||||||
skipButton.setOnClickListener { onSkipTapped?.invoke() }
|
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