display toast on openpgp status retrieval error
This commit is contained in:
parent
0b4c1b2115
commit
fb9200d2e3
3 changed files with 12 additions and 2 deletions
|
@ -320,6 +320,10 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener
|
|||
Toast.makeText(activity, R.string.error_contact_address_not_found, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
public void showErrorOpenPgpRetrieveStatus() {
|
||||
Toast.makeText(activity, R.string.error_recipient_crypto_retrieve, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
public void showErrorOpenPgpConnection() {
|
||||
Toast.makeText(activity, R.string.error_crypto_provider_connect, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import android.os.Bundle;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.text.TextUtils;
|
||||
import timber.log.Timber;
|
||||
import android.view.Menu;
|
||||
|
||||
import com.fsck.k9.Account;
|
||||
|
@ -29,6 +28,7 @@ import com.fsck.k9.R;
|
|||
import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState;
|
||||
import com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder;
|
||||
import com.fsck.k9.activity.compose.ComposeCryptoStatus.SendErrorState;
|
||||
import com.fsck.k9.activity.compose.RecipientMvpView.CryptoStatusDisplayType;
|
||||
import com.fsck.k9.helper.Contacts;
|
||||
import com.fsck.k9.helper.MailTo;
|
||||
import com.fsck.k9.helper.ReplyToParser;
|
||||
|
@ -47,6 +47,7 @@ import org.openintents.openpgp.util.OpenPgpApi;
|
|||
import org.openintents.openpgp.util.OpenPgpApi.PermissionPingCallback;
|
||||
import org.openintents.openpgp.util.OpenPgpServiceConnection;
|
||||
import org.openintents.openpgp.util.OpenPgpServiceConnection.OnBound;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class RecipientPresenter implements PermissionPingCallback {
|
||||
|
@ -392,7 +393,11 @@ public class RecipientPresenter implements PermissionPingCallback {
|
|||
@Override
|
||||
protected void onPostExecute(ComposeCryptoStatus composeCryptoStatus) {
|
||||
cachedCryptoStatus = composeCryptoStatus;
|
||||
recipientMvpView.showCryptoStatus(composeCryptoStatus.getCryptoStatusDisplayType());
|
||||
CryptoStatusDisplayType cryptoStatusDisplayType = composeCryptoStatus.getCryptoStatusDisplayType();
|
||||
if (cryptoStatusDisplayType == CryptoStatusDisplayType.ERROR) {
|
||||
recipientMvpView.showErrorOpenPgpRetrieveStatus();
|
||||
}
|
||||
recipientMvpView.showCryptoStatus(cryptoStatusDisplayType);
|
||||
recipientMvpView.showCryptoSpecialMode(composeCryptoStatus.getCryptoSpecialModeDisplayType());
|
||||
}
|
||||
}.execute();
|
||||
|
|
|
@ -1241,4 +1241,5 @@ Please submit bug reports, contribute new features and ask questions at
|
|||
<string name="mail_list_widget_loading">Loading messages…</string>
|
||||
<string name="fetching_folders_failed">Fetching folder list failed</string>
|
||||
<string name="messageview_crypto_warning_details">Show Details</string>
|
||||
<string name="error_recipient_crypto_retrieve">Error retrieving recipient status from OpenPGP provider!</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue