Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
af6d928d
Commit
af6d928d
authored
1 year ago
by
Marcus Eibrink-Lunzenauer
Committed by
Jan-Hendrik Willms
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #2661.
Closes #2661 Merge request
studip/studip!1849
parent
f118b879
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/vue/store/blubber.js
+15
-7
15 additions, 7 deletions
resources/vue/store/blubber.js
with
15 additions
and
7 deletions
resources/vue/store/blubber.js
+
15
−
7
View file @
af6d928d
...
...
@@ -213,6 +213,10 @@ export default {
}
},
loadComment
({
dispatch
},
{
id
})
{
return
dispatch
(
'
blubber-comments/loadById
'
,
{
id
},
{
root
:
true
});
},
async
loadNewerComments
({
commit
,
dispatch
,
getters
,
rootGetters
},
{
id
,
search
})
{
if
(
!
getters
.
moreNewer
(
id
))
{
return
;
...
...
@@ -319,7 +323,7 @@ export default {
{
parent
,
relationship
:
'
blubber-default-thread
'
,
data
:
{
type
:
"
blubber-threads
"
,
id
},
data
:
{
type
:
'
blubber-threads
'
,
id
},
},
{
root
:
true
}
);
...
...
@@ -339,12 +343,16 @@ export default {
updateState
({
commit
,
dispatch
},
datagram
)
{
Object
.
entries
(
datagram
).
forEach
(([
method
,
data
])
=>
{
if
(
method
===
'
addNewComments
'
)
{
return
Promise
.
all
(
Object
.
keys
(
data
).
map
((
id
)
=>
{
commit
(
'
setMoreNewer
'
,
{
id
,
hasMore
:
true
});
return
dispatch
(
'
loadNewerComments
'
,
{
id
});
})
);
const
loadThreads
=
Object
.
keys
(
data
).
map
((
id
)
=>
{
commit
(
'
setMoreNewer
'
,
{
id
,
hasMore
:
true
});
return
dispatch
(
'
loadNewerComments
'
,
{
id
});
});
const
loadComments
=
Object
.
values
(
data
)
.
flat
()
.
filter
((
comment
)
=>
comment
.
mkdate
!==
comment
.
chdate
)
.
map
(({
comment_id
})
=>
dispatch
(
'
loadComment
'
,
{
id
:
comment_id
}));
return
Promise
.
all
(
loadThreads
.
concat
(
loadComments
));
}
else
if
(
method
===
'
removeDeletedComments
'
)
{
return
Promise
.
all
(
data
.
map
((
id
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment