Commit 5d13b0b9 authored by Florent Chehab's avatar Florent Chehab

Removed now useless ignoreInvalidation and tweaked notification

parent b68243af
......@@ -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
......
......@@ -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 });
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment