From c067bf96b032e1bef3b021df246dadccbb1b5fd7 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 22 Oct 2014 17:32:59 +0200 Subject: small bug fixes for the conversation activity --- src/eu/siacs/conversations/ui/ConversationActivity.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 24ef9a6f..91e1c81f 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -605,8 +605,11 @@ public class ConversationActivity extends XmppActivity implements .beginTransaction(); transaction.replace(R.id.selected_conversation, selectedFragment, "conversation"); - - transaction.commitAllowingStateLoss(); + try { + transaction.commitAllowingStateLoss(); + } catch (IllegalStateException e) { + return selectedFragment; + } } return selectedFragment; } @@ -786,6 +789,10 @@ public class ConversationActivity extends XmppActivity implements attachAudioToConversation(getSelectedConversation(), data.getData()); } + } else { + if (requestCode == REQUEST_IMAGE_CAPTURE) { + pendingImageUri = null; + } } } -- cgit v1.2.3