mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 07:09:56 +01:00
Fix bug with qrCodeRead flag
This commit is contained in:
@@ -127,6 +127,7 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
|
|||||||
public void onQrCodeDecoded(Result result) {
|
public void onQrCodeDecoded(Result result) {
|
||||||
LOG.info("Got result from decoder");
|
LOG.info("Got result from decoder");
|
||||||
if (qrCodeRead) return;
|
if (qrCodeRead) return;
|
||||||
|
qrCodeRead = true;
|
||||||
try {
|
try {
|
||||||
byte[] payloadBytes = result.getText().getBytes(ISO_8859_1);
|
byte[] payloadBytes = result.getText().getBytes(ISO_8859_1);
|
||||||
if (LOG.isLoggable(INFO))
|
if (LOG.isLoggable(INFO))
|
||||||
@@ -197,9 +198,6 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
|
|||||||
public void onStateChanged(CustodianTask.State state) {
|
public void onStateChanged(CustodianTask.State state) {
|
||||||
this.state.postValue(state);
|
this.state.postValue(state);
|
||||||
// Connecting, SendingShard, ReceivingAck, Success, Failure
|
// Connecting, SendingShard, ReceivingAck, Success, Failure
|
||||||
if (state instanceof CustodianTask.State.SendingShard) {
|
|
||||||
qrCodeRead = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MutableLiveEvent<Boolean> getErrorTryAgain() {
|
public MutableLiveEvent<Boolean> getErrorTryAgain() {
|
||||||
|
|||||||
Reference in New Issue
Block a user