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 { ...@@ -10,10 +10,6 @@ class CustomComponentForAPI extends Component {
// mapping should be : props_key => other_props_that contains the attribute to use // mapping should be : props_key => other_props_that contains the attribute to use
__apiAttr = null; __apiAttr = null;
// prevent hard reset of module when rereading data
ignoreInvalidation = false;
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -94,7 +90,7 @@ class CustomComponentForAPI extends Component { ...@@ -94,7 +90,7 @@ class CustomComponentForAPI extends Component {
*/ */
propIsUsable(propName) { propIsUsable(propName) {
const prop = this.props[propName]; const prop = this.props[propName];
return (this.ignoreInvalidation === true || !prop.isInvalidated) return (!prop.isInvalidated)
&& successActionsWithReads && successActionsWithReads
.filter(action => action in prop) // general handling of all types of API reducers .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 .some(action => prop[action].readAt !== 0) // makes sure will consider all success actions
......
...@@ -314,7 +314,7 @@ class Editor extends Component { ...@@ -314,7 +314,7 @@ class Editor extends Component {
} }
notifySaveSuccessful(message) { notifySaveSuccessful(message) {
this.removeSavingNotification(); setTimeout(() => this.removeSavingNotification(), 1500); // add a little delay for smoothing
this.props.enqueueSnackbar(message, { variant: "success", autoHideDuration: 5000 }); 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