Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
5d13b0b9
Commit
5d13b0b9
authored
Mar 01, 2019
by
Florent Chehab
Browse files
Removed now useless ignoreInvalidation and tweaked notification
parent
b68243af
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/CustomComponentForAPI.js
View file @
5d13b0b9
...
...
@@ -10,10 +10,6 @@ class CustomComponentForAPI extends Component {
// mapping should be : props_key => other_props_that contains the attribute to use
__apiAttr
=
null
;
// prevent hard reset of module when rereading data
ignoreInvalidation
=
false
;
constructor
(
props
)
{
super
(
props
);
...
...
@@ -94,7 +90,7 @@ class CustomComponentForAPI extends Component {
*/
propIsUsable(propName) {
const prop = this.props[propName];
return (
this.ignoreInvalidation === true ||
!prop.isInvalidated)
return (!prop.isInvalidated)
&& successActionsWithReads
.filter(action => action in prop) // general handling of all types of API reducers
.some(action => prop[action].readAt !== 0) // makes sure will consider all success actions
...
...
frontend/src/components/university/shared/Editor.js
View file @
5d13b0b9
...
...
@@ -314,7 +314,7 @@ class Editor extends Component {
}
notifySaveSuccessful
(
message
)
{
this
.
removeSavingNotification
()
;
setTimeout
(()
=>
this
.
removeSavingNotification
()
,
1500
);
// add a little delay for smoothing
this
.
props
.
enqueueSnackbar
(
message
,
{
variant
:
"
success
"
,
autoHideDuration
:
5000
});
}
...
...
Write
Preview
Supports
Markdown
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