Refactor TagDayIDValueSet

old-stable24
Varun Patil 2022-10-24 18:34:46 -07:00
parent fe92c5cca4
commit 44355b3eb2
2 changed files with 11 additions and 7 deletions

View File

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

View File

@ -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 */