Skip to content

Commit

Permalink
Show only unique tags
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-ismagilov committed Aug 3, 2023
1 parent ea70464 commit d1b6a02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Util/PhotoInfoHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { TAG_ALBUM, TAG_EVENT, TAG_PERSON, TAG_PHOTOGRAPHER, TAG_TEAM } from "../consts";

import UniqueList from "./UniqueList";

const MAX_INT = 65535;

const convertRel = (text) => convertNum(text) / MAX_INT;
Expand Down Expand Up @@ -84,6 +86,11 @@ function ParsePhotoInfo(tags, description) {
photoInfo.person.push(parsedPerson);
}
}
photoInfo.event = UniqueList(photoInfo.event);
photoInfo.team = UniqueList(photoInfo.team);
photoInfo.album = UniqueList(photoInfo.album);
photoInfo.photographer = UniqueList(photoInfo.photographer);

return photoInfo;
}

Expand Down

0 comments on commit d1b6a02

Please sign in to comment.