add action/method to flush storage and reload the session

This commit is contained in:
Bruno Windels 2018-08-09 18:41:18 +02:00
parent 028f09e5d1
commit a02e1aa2b2
2 changed files with 37 additions and 0 deletions

View file

@ -479,6 +479,14 @@ export default React.createClass({
case 'logout':
Lifecycle.logout();
break;
case 'flush_storage_reload':
// flushStorageAndReload will dispatch actions
// which we can't do in a dispatch handler
// so yield first
setTimeout(() => {
Lifecycle.flushStorageAndReload();
}, 0);
break;
case 'start_registration':
this._startRegistration(payload.params || {});
break;