refactor: add extra guard for sort change
This commit is contained in:
@@ -12,6 +12,8 @@ import {
|
||||
DecryptedItemInterface,
|
||||
SNNote,
|
||||
TagMutator,
|
||||
isSystemView,
|
||||
isSmartView,
|
||||
} from '@standardnotes/snjs'
|
||||
import { useState, useEffect, useCallback, useMemo, useRef } from 'react'
|
||||
import { FileItemActionType } from '../AttachedFilesPopover/PopoverFileItemAction'
|
||||
@@ -307,6 +309,11 @@ const ContentTableView = ({
|
||||
return
|
||||
}
|
||||
|
||||
const isNonFilesSystemView = isSmartView(selectedTag) && isSystemView(selectedTag)
|
||||
if (isNonFilesSystemView) {
|
||||
return
|
||||
}
|
||||
|
||||
await application.mutator.changeAndSaveItem<TagMutator>(selectedTag, (mutator) => {
|
||||
mutator.preferences = {
|
||||
...mutator.preferences,
|
||||
|
||||
Reference in New Issue
Block a user