mirror of
https://github.com/M66B/FairEmail.git
synced 2026-05-18 13:08:16 +02:00
Document sign key handling
This commit is contained in:
@@ -85,7 +85,7 @@ public interface DaoIdentity {
|
||||
int setIdentityConnected(long id, long last_connected);
|
||||
|
||||
@Query("UPDATE identity SET sign_key = :sign_key WHERE id = :id")
|
||||
int setIdentitySignKey(long id, long sign_key);
|
||||
int setIdentitySignKey(long id, Long sign_key);
|
||||
|
||||
@Query("UPDATE identity SET error = :error WHERE id = :id")
|
||||
int setIdentityError(long id, String error);
|
||||
|
||||
@@ -1486,11 +1486,13 @@ public class FragmentCompose extends FragmentBase {
|
||||
return result.getParcelableExtra(OpenPgpApi.RESULT_INTENT);
|
||||
|
||||
case OpenPgpApi.RESULT_CODE_ERROR:
|
||||
if (identity != null)
|
||||
db.identity().setIdentitySignKey(identity.id, null);
|
||||
OpenPgpError error = result.getParcelableExtra(OpenPgpApi.RESULT_ERROR);
|
||||
if (error == null)
|
||||
throw new IllegalArgumentException("Unknown error");
|
||||
else
|
||||
throw new IllegalArgumentException(error.getMessage());
|
||||
throw new IllegalArgumentException(error.getMessage() + " (" + error.getErrorId() + ")");
|
||||
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown result code=" + resultCode);
|
||||
|
||||
Reference in New Issue
Block a user