2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Hopefully fix NPE

This commit is contained in:
Albert Vaca Cintora
2022-12-29 18:51:12 +01:00
parent 5225d0b200
commit bdfc21cf64

View File

@@ -269,16 +269,17 @@ public class DeviceFragment extends Fragment {
}
private void refreshUI() {
if (device == null || binding == null) {
return;
if (device != null) {
//Once in-app, there is no point in keep displaying the notification if any
device.hidePairingNotification();
}
//Once in-app, there is no point in keep displaying the notification if any
device.hidePairingNotification();
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (device == null || binding == null) {
return;
}
if (device.isPairRequestedByPeer()) {
binding.pairMessage.setText(R.string.pair_requested);
binding.pairVerification.setVisibility(View.VISIBLE);