diff --git a/src/mixins/GlobalMixin.ts b/src/mixins/GlobalMixin.ts index 4ce25188..99733cb3 100644 --- a/src/mixins/GlobalMixin.ts +++ b/src/mixins/GlobalMixin.ts @@ -9,5 +9,5 @@ export default class GlobalMixin extends Vue { public readonly c = constants.c; public readonly TagDayID = constants.TagDayID; - public readonly TagDayIDValueSet = new Set(Object.values(this.TagDayID)); + public readonly TagDayIDValueSet = constants.TagDayIDValueSet; } \ No newline at end of file diff --git a/src/services/Utils.ts b/src/services/Utils.ts index 9b6727ad..85b2633f 100644 --- a/src/services/Utils.ts +++ b/src/services/Utils.ts @@ -175,6 +175,14 @@ export function convertFlags(photo: IPhoto) { } } +// Outside for set +const TagDayID = { + START: -(1 << 30), + FOLDERS: -(1 << 30) + 1, + TAGS: -(1 << 30) + 2, + FACES: -(1 << 30) + 3, +} + /** Global constants */ export const constants = { c: { @@ -189,12 +197,8 @@ export const constants = { FLAG_LEAVING: 1 << 8, }, - TagDayID: { - START: -(1 << 30), - FOLDERS: -(1 << 30) + 1, - TAGS: -(1 << 30) + 2, - FACES: -(1 << 30) + 3, - }, + TagDayID: TagDayID, + TagDayIDValueSet: new Set(Object.values(TagDayID)), } /** Cache store */