From 851f7b073db781281a85fd369ea92ff0bc31ce7e Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 31 Jan 2020 15:02:33 +0100 Subject: use ToastCompat instead of Toast --- src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java') diff --git a/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java b/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java index 0e7a2ce57..8febb90b4 100644 --- a/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java +++ b/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java @@ -26,6 +26,7 @@ import de.pixart.messenger.entities.Conversation; import de.pixart.messenger.services.XmppConnectionService; import de.pixart.messenger.utils.CryptoHelper; import de.pixart.messenger.utils.XmppUri; +import me.drakeet.support.toast.ToastCompat; import rocks.xmpp.addr.Jid; public class VerifyOTRActivity extends XmppActivity implements XmppConnectionService.OnConversationUpdate { @@ -58,7 +59,7 @@ public class VerifyOTRActivity extends XmppActivity implements XmppConnectionSer public void onClick(DialogInterface dialogInterface, int click) { mConversation.verifyOtrFingerprint(); xmppConnectionService.syncRosterToDisk(mConversation.getAccount()); - Toast.makeText(VerifyOTRActivity.this, R.string.verified, Toast.LENGTH_SHORT).show(); + ToastCompat.makeText(VerifyOTRActivity.this, R.string.verified, Toast.LENGTH_SHORT).show(); finish(); } }; @@ -174,18 +175,18 @@ public class VerifyOTRActivity extends XmppActivity implements XmppConnectionSer Contact contact = mConversation.getContact(); if (this.mConversation.getContact().getJid().equals(uri.getJid()) && uri.hasFingerprints()) { xmppConnectionService.verifyFingerprints(contact, uri.getFingerprints()); - Toast.makeText(this, R.string.verified, Toast.LENGTH_SHORT).show(); + ToastCompat.makeText(this, R.string.verified, Toast.LENGTH_SHORT).show(); updateView(); return true; } else { - Toast.makeText(this, R.string.could_not_verify_fingerprint, Toast.LENGTH_SHORT).show(); + ToastCompat.makeText(this, R.string.could_not_verify_fingerprint, Toast.LENGTH_SHORT).show(); return false; } } protected boolean isAccountOnline() { if (this.mAccount.getStatus() != Account.State.ONLINE) { - Toast.makeText(this, R.string.not_connected_try_again, Toast.LENGTH_SHORT).show(); + ToastCompat.makeText(this, R.string.not_connected_try_again, Toast.LENGTH_SHORT).show(); return false; } else { return true; -- cgit v1.2.3