mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
clean up in attachment chooser code. fixed #1168
This commit is contained in:
parent
e388c75452
commit
61fd5d6696
@ -398,12 +398,7 @@ public class ConversationActivity extends XmppActivity
|
||||
}
|
||||
|
||||
private void selectPresenceToAttachFile(final int attachmentChoice, final int encryption) {
|
||||
if (attachmentChoice == ATTACHMENT_CHOICE_LOCATION && encryption != Message.ENCRYPTION_OTR) {
|
||||
getSelectedConversation().setNextCounterpart(null);
|
||||
Intent intent = new Intent("eu.siacs.conversations.location.request");
|
||||
startActivityForResult(intent,attachmentChoice);
|
||||
} else {
|
||||
selectPresence(getSelectedConversation(), new OnPresenceSelected() {
|
||||
final OnPresenceSelected callback = new OnPresenceSelected() {
|
||||
|
||||
@Override
|
||||
public void onPresenceSelected() {
|
||||
@ -452,7 +447,12 @@ public class ConversationActivity extends XmppActivity
|
||||
startActivity(getInstallApkIntent(fallbackPackageId));
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
if (attachmentChoice == ATTACHMENT_CHOICE_LOCATION && encryption != Message.ENCRYPTION_OTR) {
|
||||
getSelectedConversation().setNextCounterpart(null);
|
||||
callback.onPresenceSelected();
|
||||
} else {
|
||||
selectPresence(getSelectedConversation(),callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user