clear pending photo uri only when also clearing activity result

Daniel Gultsch created

on some phones the onBackendConnected finishes prior to the onActivityResult()
leading to the pending photo uri being cleared before processing the result.

this leads to 'Take photo' not working.

but we probably donโ€™t need to clear the photo uri if there is to activiyResult
to clear as well

Change summary

src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 6 
1 file changed, 3 insertions(+), 3 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/ui/ConversationFragment.java ๐Ÿ”—

@@ -2879,13 +2879,13 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
     private void clearPending() {
         if (postponedActivityResult.clear()) {
             Log.e(Config.LOGTAG, "cleared pending intent with unhandled result left");
+            if (pendingTakePhotoUri.clear()) {
+                Log.e(Config.LOGTAG, "cleared pending photo uri");
+            }
         }
         if (pendingScrollState.clear()) {
             Log.e(Config.LOGTAG, "cleared scroll state");
         }
-        if (pendingTakePhotoUri.clear()) {
-            Log.e(Config.LOGTAG, "cleared pending photo uri");
-        }
         if (pendingConversationsUuid.clear()) {
             Log.e(Config.LOGTAG, "cleared pending conversations uuid");
         }