Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
101a7f37
Commit
101a7f37
authored
Jan 26, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed batch comments specs
parent
aeec5fa3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/notes/components/notes_app.vue
app/assets/javascripts/notes/components/notes_app.vue
+0
-2
app/assets/javascripts/notes/stores/actions.js
app/assets/javascripts/notes/stores/actions.js
+4
-2
app/assets/javascripts/notes/stores/mutations.js
app/assets/javascripts/notes/stores/mutations.js
+17
-0
No files found.
app/assets/javascripts/notes/components/notes_app.vue
View file @
101a7f37
...
@@ -108,7 +108,6 @@ export default {
...
@@ -108,7 +108,6 @@ export default {
async
isFetching
()
{
async
isFetching
()
{
if
(
!
this
.
isFetching
)
{
if
(
!
this
.
isFetching
)
{
await
this
.
$nextTick
();
await
this
.
$nextTick
();
await
this
.
updateResolvableDiscussionsCounts
();
await
this
.
startTaskList
();
await
this
.
startTaskList
();
await
this
.
checkLocationHash
();
await
this
.
checkLocationHash
();
}
}
...
@@ -180,7 +179,6 @@ export default {
...
@@ -180,7 +179,6 @@ export default {
'
convertToDiscussion
'
,
'
convertToDiscussion
'
,
'
stopPolling
'
,
'
stopPolling
'
,
'
setConfidentiality
'
,
'
setConfidentiality
'
,
'
updateResolvableDiscussionsCounts
'
,
]),
]),
discussionIsIndividualNoteAndNotConverted
(
discussion
)
{
discussionIsIndividualNoteAndNotConverted
(
discussion
)
{
return
discussion
.
individual_note
&&
!
this
.
convertedDisscussionIds
.
includes
(
discussion
.
id
);
return
discussion
.
individual_note
&&
!
this
.
convertedDisscussionIds
.
includes
(
discussion
.
id
);
...
...
app/assets/javascripts/notes/stores/actions.js
View file @
101a7f37
...
@@ -424,7 +424,7 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
...
@@ -424,7 +424,7 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
export
const
setFetchingState
=
({
commit
},
fetchingState
)
=>
export
const
setFetchingState
=
({
commit
},
fetchingState
)
=>
commit
(
types
.
SET_NOTES_FETCHING_STATE
,
fetchingState
);
commit
(
types
.
SET_NOTES_FETCHING_STATE
,
fetchingState
);
const
pollSuccessCallBack
=
(
resp
,
commit
,
state
,
getters
,
dispatch
)
=>
{
const
pollSuccessCallBack
=
async
(
resp
,
commit
,
state
,
getters
,
dispatch
)
=>
{
if
(
state
.
isResolvingDiscussion
)
{
if
(
state
.
isResolvingDiscussion
)
{
return
null
;
return
null
;
}
}
...
@@ -437,8 +437,9 @@ const pollSuccessCallBack = (resp, commit, state, getters, dispatch) => {
...
@@ -437,8 +437,9 @@ const pollSuccessCallBack = (resp, commit, state, getters, dispatch) => {
}
}
if
(
resp
.
notes
?.
length
)
{
if
(
resp
.
notes
?.
length
)
{
dispatch
(
'
updateOrCreateNotes
'
,
resp
.
notes
);
await
dispatch
(
'
updateOrCreateNotes
'
,
resp
.
notes
);
dispatch
(
'
startTaskList
'
);
dispatch
(
'
startTaskList
'
);
dispatch
(
'
updateResolvableDiscussionsCounts
'
);
}
}
commit
(
types
.
SET_LAST_FETCHED_AT
,
resp
.
last_fetched_at
);
commit
(
types
.
SET_LAST_FETCHED_AT
,
resp
.
last_fetched_at
);
...
@@ -449,6 +450,7 @@ const pollSuccessCallBack = (resp, commit, state, getters, dispatch) => {
...
@@ -449,6 +450,7 @@ const pollSuccessCallBack = (resp, commit, state, getters, dispatch) => {
const
getFetchDataParams
=
(
state
)
=>
{
const
getFetchDataParams
=
(
state
)
=>
{
const
endpoint
=
state
.
notesData
.
notesPath
;
const
endpoint
=
state
.
notesData
.
notesPath
;
const
options
=
{
const
options
=
{
params
:
{
t
:
new
Date
().
getTime
()
},
headers
:
{
headers
:
{
'
X-Last-Fetched-At
'
:
state
.
lastFetchedAt
?
`
${
state
.
lastFetchedAt
}
`
:
undefined
,
'
X-Last-Fetched-At
'
:
state
.
lastFetchedAt
?
`
${
state
.
lastFetchedAt
}
`
:
undefined
,
},
},
...
...
app/assets/javascripts/notes/stores/mutations.js
View file @
101a7f37
...
@@ -32,6 +32,23 @@ export default {
...
@@ -32,6 +32,23 @@ export default {
}
}
}
}
if
(
window
.
gon
?.
features
?.
paginatedNotes
&&
note
.
base_discussion
&&
type
===
constants
.
DIFF_NOTE
)
{
if
(
discussion
.
diff_file
)
{
discussion
.
file_hash
=
discussion
.
diff_file
.
file_hash
;
discussion
.
truncated_diff_lines
=
utils
.
prepareDiffLines
(
discussion
.
truncated_diff_lines
||
[],
);
}
discussion
.
expanded
=
note
.
expanded
;
discussion
.
resolved
=
note
.
resolved
;
}
// note.base_discussion = undefined; // No point keeping a reference to this
// note.base_discussion = undefined; // No point keeping a reference to this
delete
note
.
base_discussion
;
delete
note
.
base_discussion
;
discussion
.
notes
=
[
note
];
discussion
.
notes
=
[
note
];
...
...
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