Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad25de41 authored by Aayush Gupta's avatar Aayush Gupta Committed by Chirayu Desai
Browse files

base: ChooserActivity: Don't show image edit button on multiple targets



Ie52aaab90f678d32d9b67f95d81f86b82d1b9c7c introduced edit button but didn't
took into account that there can be multiple images being shared. This patch
adds a check to ensure that this action is not shown in such cases.

Signed-off-by: default avatarAayush Gupta <aayushgupta219@gmail.com>
Change-Id: I787cd9cfd873242542b330a522bed5df9deb62a4
parent f606ff9c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1394,13 +1394,16 @@ public class ChooserActivity extends ResolverActivity implements

        final ViewGroup actionRow =
                (ViewGroup) contentPreviewLayout.findViewById(R.id.chooser_action_row);
        String action = targetIntent.getAction();

        //TODO: addActionButton(actionRow, createCopyButton());
        addActionButton(actionRow, createNearbyButton(targetIntent));
        if (!Intent.ACTION_SEND_MULTIPLE.equals(action)) {
            addActionButton(actionRow, createEditButton(targetIntent));
        }

        mPreviewCoord = new ContentPreviewCoordinator(contentPreviewLayout, false);

        String action = targetIntent.getAction();
        if (Intent.ACTION_SEND.equals(action)) {
            Uri uri = targetIntent.getParcelableExtra(Intent.EXTRA_STREAM);
            imagePreview.findViewById(R.id.content_preview_image_1_large)