chore: fix ContentType usage (#2353)
* chore: fix ContentType usage * chore: fix specs
This commit is contained in:
@@ -415,7 +415,7 @@ export class AppContext {
|
||||
if (!didCompleteRelevantSync) {
|
||||
if (data?.savedPayloads) {
|
||||
const matching = data.savedPayloads.find((p) => {
|
||||
return p.content_type === ContentType.UserPrefs
|
||||
return p.content_type === ContentType.TYPES.UserPrefs
|
||||
})
|
||||
if (matching) {
|
||||
didCompleteRelevantSync = true
|
||||
@@ -510,7 +510,7 @@ export class AppContext {
|
||||
}
|
||||
|
||||
spyOnChangedItems(callback) {
|
||||
this.application.items.addObserver(ContentType.Any, ({ changed, unerrored }) => {
|
||||
this.application.items.addObserver(ContentType.TYPES.Any, ({ changed, unerrored }) => {
|
||||
callback([...changed, ...unerrored])
|
||||
})
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export function createItemParams(contentType) {
|
||||
export function createNoteParams({ title, text, dirty = true } = {}) {
|
||||
const params = {
|
||||
uuid: Utils.generateUuid(),
|
||||
content_type: ContentType.Note,
|
||||
content_type: ContentType.TYPES.Note,
|
||||
dirty: dirty,
|
||||
dirtyIndex: dirty ? getIncrementedDirtyIndex() : undefined,
|
||||
content: FillItemContent({
|
||||
@@ -34,7 +34,7 @@ export function createNoteParams({ title, text, dirty = true } = {}) {
|
||||
export function createTagParams({ title, dirty = true, uuid = undefined } = {}) {
|
||||
const params = {
|
||||
uuid: uuid || Utils.generateUuid(),
|
||||
content_type: ContentType.Tag,
|
||||
content_type: ContentType.TYPES.Tag,
|
||||
dirty: dirty,
|
||||
dirtyIndex: dirty ? getIncrementedDirtyIndex() : undefined,
|
||||
content: FillItemContent({
|
||||
|
||||
Reference in New Issue
Block a user