Skip to content

Commit

Permalink
Merge pull request #4682 from nextcloud/fix/smartpicker-order
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Aug 18, 2023
2 parents 0a2b0d8 + 523e5f4 commit e307c8b
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-editors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-editors.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/components/Suggestion/LinkPicker/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ export default () => createSuggestions({
},
items: ({ editor, query }) => {
return [
...formattingSuggestions(query)
.filter(({ action, isActive }) => {
const canRunState = action(editor?.can())
const isActiveState = isActive && getIsActive({ isActive }, editor)
return canRunState && !isActiveState
}),
...searchProvider(query)
.map(p => {
return {
Expand All @@ -94,6 +88,12 @@ export default () => createSuggestions({
providerId: p.id,
}
}),
...formattingSuggestions(query)
.filter(({ action, isActive }) => {
const canRunState = action(editor?.can())
const isActiveState = isActive && getIsActive({ isActive }, editor)
return canRunState && !isActiveState
}),
]
},
})

0 comments on commit e307c8b

Please sign in to comment.