2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 09:58:08 +00:00

Always display the verification key when pairing

This commit is contained in:
Albert Vaca Cintora 2024-05-12 20:07:03 +02:00
parent 440f1d4fa3
commit 4c0acbb71c
2 changed files with 2 additions and 6 deletions

View File

@ -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" />

View File

@ -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