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

Commit bd52f5e7 authored by George Mount's avatar George Mount Committed by Android Git Automerger
Browse files

am 25fab805: Merge "Fix extra gray item in secure album." into gb-ub-photos-arches

* commit '25fab805':
  Fix extra gray item in secure album.
parents 77262bd5 25fab805
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -64,18 +64,23 @@ public class SecureAlbum extends MediaSet implements StitchingChangeListener {
    }

    public void addMediaItem(boolean isVideo, int id) {
        Path pathBase;
        if (isVideo) {
            mAllItems.add(Path.fromString("/local/video/item/" + id));
            pathBase = LocalVideo.ITEM_PATH;
            mMinVideoId = Math.min(mMinVideoId, id);
            mMaxVideoId = Math.max(mMaxVideoId, id);
        } else {
            mAllItems.add(Path.fromString("/local/image/item/" + id));
            pathBase = LocalImage.ITEM_PATH;
            mMinImageId = Math.min(mMinImageId, id);
            mMaxImageId = Math.max(mMaxImageId, id);
        }
        Path path = pathBase.getChild(id);
        if (!mAllItems.contains(path)) {
            mAllItems.add(path);
            mAllItemTypes.add(isVideo);
            mNotifier.fakeChange();
        }
    }

    // The sequence is stitching items, local media items, and unlock image.
    @Override