diff --git a/res/layout/view_pair_request.xml b/res/layout/view_pair_request.xml index 80aa1b04..d279b050 100644 --- a/res/layout/view_pair_request.xml +++ b/res/layout/view_pair_request.xml @@ -40,7 +40,6 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted android:drawablePadding="5dp" android:layout_marginBottom="8dip" android:importantForAccessibility="no" - android:visibility="gone" android:textAppearance="?android:attr/textAppearanceMedium" app:drawableStartCompat="@drawable/ic_key" /> diff --git a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.kt b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.kt index 5494455c..f95d237e 100644 --- a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.kt +++ b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.kt @@ -114,12 +114,12 @@ class DeviceFragment : Fragment() { this.refreshDevicesAction() } + requirePairingBinding().pairVerification.text = SslHelper.getVerificationKey(SslHelper.certificate, device?.certificate) + requirePairingBinding().pairButton.setOnClickListener { with(requirePairingBinding()) { pairButton.visibility = View.GONE pairMessage.text = getString(R.string.pair_requested) - pairVerification.visibility = View.VISIBLE - pairVerification.text = SslHelper.getVerificationKey(SslHelper.certificate, device?.certificate) pairProgress.visibility = View.VISIBLE } device?.requestPairing() @@ -314,8 +314,6 @@ class DeviceFragment : Fragment() { mActivity?.runOnUiThread { with(requirePairingBinding()) { pairMessage.text = error - pairVerification.text = null - pairVerification.visibility = View.GONE pairProgress.visibility = View.GONE pairButton.visibility = View.VISIBLE pairRequestButtons.visibility = View.GONE @@ -328,7 +326,6 @@ class DeviceFragment : Fragment() { mActivity?.runOnUiThread { with(requirePairingBinding()) { pairMessage.setText(R.string.device_not_paired) - pairVerification.visibility = View.GONE pairProgress.visibility = View.GONE pairButton.visibility = View.VISIBLE pairRequestButtons.visibility = View.GONE