aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationFragment.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-08 17:31:53 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-08 17:31:53 +0200
commitc555a9d03c25407be43b114d74edd6f2c1587300 (patch)
tree903217ec2f51ede7d30704ef8a82d76edceb704d /src/eu/siacs/conversations/ui/ConversationFragment.java
parent7fa61564b83b4a9e3403974b291750286a32d451 (diff)
sending text message after returing from pending intent
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationFragment.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java35
1 files changed, 7 insertions, 28 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index e370deb0..e06c9eeb 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -664,10 +664,10 @@ public class ConversationFragment extends Fragment {
}
protected void sendPgpMessage(final Message message) {
+ activity.pendingMessage = message;
final ConversationActivity activity = (ConversationActivity) getActivity();
final XmppConnectionService xmppService = activity.xmppConnectionService;
final Contact contact = message.getConversation().getContact();
- final Account account = message.getConversation().getAccount();
if (activity.hasPgp()) {
if (contact.getPgpKeyId() != 0) {
xmppService.getPgpEngine().hasKey(contact,
@@ -677,37 +677,12 @@ public class ConversationFragment extends Fragment {
public void userInputRequried(PendingIntent pi) {
activity.runIntent(
pi,
- ConversationActivity.REQUEST_SEND_MESSAGE);
+ ConversationActivity.REQUEST_ENCRYPT_MESSAGE);
}
@Override
public void success() {
- xmppService.getPgpEngine().encrypt(account,
- message, new OnPgpEngineResult() {
-
- @Override
- public void userInputRequried(
- PendingIntent pi) {
- activity.runIntent(
- pi,
- ConversationActivity.REQUEST_SEND_MESSAGE);
- }
-
- @Override
- public void success() {
- xmppService.sendMessage(
- message, null);
- chatMsg.setText("");
- }
-
- @Override
- public void error(
- OpenPgpError openPgpError) {
- // TODO Auto-generated method
- // stub
-
- }
- });
+ activity.encryptTextMessage();
}
@Override
@@ -809,4 +784,8 @@ public class ConversationFragment extends Fragment {
public void setText(String text) {
this.pastedText = text;
}
+
+ public void clearInputField() {
+ this.chatMsg.setText("");
+ }
}