Skip to content

Commit

Permalink
Disable multiple-click on the QR code button on add recipient screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
kukabi committed Feb 26, 2021
1 parent ecdea7b commit adae21d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class AddRecipientFragment : Fragment(),
OverScrollDecoratorHelper.setUpOverScroll(ui.searchEditTextScrollView)
ui.searchEditText.inputType = InputType.TYPE_NULL
ui.backButton.setOnClickListener { onBackButtonClicked(it) }
ui.qrCodeButton.setOnClickListener { onQRButtonClick() }
ui.qrCodeButton.setOnClickListener { onQRButtonClick(it) }
ui.continueButton.setOnClickListener { onContinueButtonClicked(it) }
dimmerViews.forEach { it.setOnClickListener { onEmojiIdDimmerClicked() } }
ui.pasteEmojiIdButton.setOnClickListener { onPasteEmojiIdButtonClicked() }
Expand Down Expand Up @@ -554,7 +554,8 @@ class AddRecipientFragment : Fragment(),
/**
* Open QR code scanner on button click.
*/
private fun onQRButtonClick() {
private fun onQRButtonClick(view: View) {
view.temporarilyDisableClick()
requireActivity().hideKeyboard()
hidePasteEmojiIdViews(animate = true) {
ui.rootView.postDelayed(Constants.UI.keyboardHideWaitMs) { startQRCodeActivity() }
Expand Down

0 comments on commit adae21d

Please sign in to comment.