mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Show relevant message when contact QR code has unknown format.
This commit is contained in:
@@ -148,7 +148,7 @@ public class AddNearbyContactActivity extends BriarActivity
|
||||
} else if (state instanceof WrongQrCodeType) {
|
||||
QrCodeType qrCodeType = ((WrongQrCodeType) state).qrCodeType;
|
||||
if (qrCodeType == MAILBOX) onMailboxQrCodeScanned();
|
||||
else showErrorFragment();
|
||||
else onWrongQrCodeType();
|
||||
} else if (state instanceof WrongQrCodeVersion) {
|
||||
boolean qrCodeTooOld = ((WrongQrCodeVersion) state).qrCodeTooOld;
|
||||
onWrongQrCodeVersion(qrCodeTooOld);
|
||||
@@ -187,6 +187,13 @@ public class AddNearbyContactActivity extends BriarActivity
|
||||
AddNearbyContactErrorFragment.newInstance(title, msg, false));
|
||||
}
|
||||
|
||||
private void onWrongQrCodeType() {
|
||||
String title = getString(R.string.qr_code_invalid);
|
||||
String msg = getString(R.string.qr_code_format_unknown);
|
||||
showNextFragment(
|
||||
AddNearbyContactErrorFragment.newInstance(title, msg, false));
|
||||
}
|
||||
|
||||
private void onWrongQrCodeVersion(boolean qrCodeTooOld) {
|
||||
String title = getString(R.string.qr_code_invalid);
|
||||
String msg;
|
||||
|
||||
Reference in New Issue
Block a user