Refactor TagDayIDValueSet

old-stable24
Varun Patil 2022-10-24 18:34:46 -07:00
parent 0160a9b23d
commit 7e48d06cc3
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 c = constants.c;
public readonly TagDayID = constants.TagDayID; 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 */ /** Global constants */
export const constants = { export const constants = {
c: { c: {
@ -189,12 +197,8 @@ export const constants = {
FLAG_LEAVING: 1 << 8, FLAG_LEAVING: 1 << 8,
}, },
TagDayID: { TagDayID: TagDayID,
START: -(1 << 30), TagDayIDValueSet: new Set(Object.values(TagDayID)),
FOLDERS: -(1 << 30) + 1,
TAGS: -(1 << 30) + 2,
FACES: -(1 << 30) + 3,
},
} }
/** Cache store */ /** Cache store */