Merge branch 'social-backup-poc' into remote-wipe-poc

* social-backup-poc:
  Fix bug with qrCodeRead flag
  Fix bug with qrCodeRead flag
This commit is contained in:
ameba23
2021-06-15 16:32:24 +02:00
2 changed files with 1 additions and 5 deletions

View File

@@ -127,6 +127,7 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
public void onQrCodeDecoded(Result result) {
LOG.info("Got result from decoder");
if (qrCodeRead) return;
qrCodeRead = true;
try {
byte[] payloadBytes = result.getText().getBytes(ISO_8859_1);
if (LOG.isLoggable(INFO))
@@ -197,9 +198,6 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
public void onStateChanged(CustodianTask.State state) {
this.state.postValue(state);
// Connecting, SendingShard, ReceivingAck, Success, Failure
if (state instanceof CustodianTask.State.SendingShard) {
qrCodeRead = true;
}
}
public MutableLiveEvent<Boolean> getErrorTryAgain() {