mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
hiding the prepare image toast after error or success
This commit is contained in:
parent
08a26d2772
commit
ca7e24c30d
@ -384,7 +384,6 @@ public class ConversationActivity extends XmppActivity {
|
||||
@Override
|
||||
public void error(int error) {
|
||||
displayErrorDialog(error);
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -728,22 +727,37 @@ public class ConversationActivity extends XmppActivity {
|
||||
|
||||
@Override
|
||||
public void userInputRequried(PendingIntent pi) {
|
||||
hidePrepareImageToast();
|
||||
ConversationActivity.this.runIntent(pi, ConversationActivity.REQUEST_SEND_PGP_IMAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void success() {
|
||||
sendPendingImageMessage();
|
||||
hidePrepareImageToast();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(int error) {
|
||||
hidePrepareImageToast();
|
||||
pendingMessage = null;
|
||||
displayErrorDialog(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void hidePrepareImageToast() {
|
||||
if (prepareImageToast!=null) {
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
prepareImageToast.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void sendPendingImageMessage() {
|
||||
pendingMessage.getConversation().getMessages().add(pendingMessage);
|
||||
xmppConnectionService.databaseBackend.createMessage(pendingMessage);
|
||||
|
@ -1,7 +1,5 @@
|
||||
package eu.siacs.conversations.ui;
|
||||
|
||||
import java.nio.channels.AlreadyConnectedException;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
|
Loading…
Reference in New Issue
Block a user