refactor: native feature management (#2350)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { ComponentPermission } from '@standardnotes/features'
|
||||
import { SNComponent } from '../../Syncable/Component'
|
||||
import { ComponentInterface } from '../../Syncable/Component'
|
||||
|
||||
export type PermissionDialog = {
|
||||
component: SNComponent
|
||||
component: ComponentInterface
|
||||
permissions: ComponentPermission[]
|
||||
permissionsString: string
|
||||
actionBlock: (approved: boolean) => void
|
||||
|
||||
@@ -5,7 +5,7 @@ import { DecryptedItemInterface } from './DecryptedItem'
|
||||
import { isDecryptedPayload, isDeletedPayload, isEncryptedPayload } from '../../Payload/Interfaces/TypeCheck'
|
||||
|
||||
export function isDecryptedItem(item: ItemInterface): item is DecryptedItemInterface {
|
||||
return isDecryptedPayload(item.payload)
|
||||
return 'payload' in item && isDecryptedPayload(item.payload)
|
||||
}
|
||||
|
||||
export function isEncryptedItem(item: ItemInterface): item is EncryptedItemInterface {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class DecryptedItemMutator<
|
||||
constructor(item: I, type: MutationType) {
|
||||
super(item, type)
|
||||
|
||||
const mutableCopy = Copy(this.immutablePayload.content)
|
||||
const mutableCopy = Copy<C>(this.immutablePayload.content)
|
||||
this.mutableContent = mutableCopy
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user