Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
aa152017
Commit
aa152017
authored
Apr 12, 2022
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing types in selection store module
parent
847e6c85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
selection.js
src/sidebar/store/modules/selection.js
+8
-1
No files found.
src/sidebar/store/modules/selection.js
View file @
aa152017
...
@@ -216,6 +216,7 @@ const reducers = {
...
@@ -216,6 +216,7 @@ const reducers = {
newTab
=
'annotation'
;
newTab
=
'annotation'
;
}
}
/** @param {BooleanMap} collection */
const
removeAnns
=
collection
=>
{
const
removeAnns
=
collection
=>
{
action
.
annotationsToRemove
.
forEach
(
annotation
=>
{
action
.
annotationsToRemove
.
forEach
(
annotation
=>
{
if
(
annotation
.
id
)
{
if
(
annotation
.
id
)
{
...
@@ -251,6 +252,7 @@ function clearSelection() {
...
@@ -251,6 +252,7 @@ function clearSelection() {
* @param {string[]} ids - Identifiers of annotations to select
* @param {string[]} ids - Identifiers of annotations to select
*/
*/
function
selectAnnotations
(
ids
)
{
function
selectAnnotations
(
ids
)
{
/** @param {import('redux').Dispatch} dispatch */
return
dispatch
=>
{
return
dispatch
=>
{
dispatch
(
clearSelection
());
dispatch
(
clearSelection
());
dispatch
(
dispatch
(
...
@@ -291,7 +293,11 @@ function setForcedVisible(id, visible) {
...
@@ -291,7 +293,11 @@ function setForcedVisible(id, visible) {
return
makeAction
(
reducers
,
'SET_FORCED_VISIBLE'
,
{
id
,
visible
});
return
makeAction
(
reducers
,
'SET_FORCED_VISIBLE'
,
{
id
,
visible
});
}
}
/** Sets the sort key for the annotation list. */
/**
* Sets the sort key for the annotation list.
*
* @param {SortKey} key
*/
function
setSortKey
(
key
)
{
function
setSortKey
(
key
)
{
return
makeAction
(
reducers
,
'SET_SORT_KEY'
,
{
key
});
return
makeAction
(
reducers
,
'SET_SORT_KEY'
,
{
key
});
}
}
...
@@ -375,6 +381,7 @@ const sortKeys = createSelector(
...
@@ -375,6 +381,7 @@ const sortKeys = createSelector(
/** @param {State} state */
/** @param {State} state */
state
=>
state
.
selectedTab
,
state
=>
state
.
selectedTab
,
selectedTab
=>
{
selectedTab
=>
{
/** @type {SortKey[]} */
const
sortKeysForTab
=
[
'Newest'
,
'Oldest'
];
const
sortKeysForTab
=
[
'Newest'
,
'Oldest'
];
if
(
selectedTab
!==
'note'
)
{
if
(
selectedTab
!==
'note'
)
{
// Location is inapplicable to Notes tab
// Location is inapplicable to Notes tab
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment