clear pending photo uri only when also clearing activity result

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
This commit is contained in:
Daniel Gultsch 2020-06-17 17:56:19 +02:00
parent 4493f6cc13
commit 47804205b6

View file

@ -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");
}