From 217711df9f22d42fd0ae5b9f48fe4cffa17633f7 Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Sun, 31 Jul 2016 21:53:58 -0300 Subject: [PATCH] Fixes #125 --- app/view/main/MainController.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 0cfc0e03..e725f92b 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -1028,6 +1028,10 @@ Ext.define('Rambox.view.main.MainController', { // Firebase not empty and Have no Services } else if ( snapshot2.hasChildren() && Ext.getStore('Services').getCount() === 0 ) { importServices(snapshot2); + } else { + // Save the profile and JWT. + localStorage.setItem('profile', JSON.stringify(profile)); + localStorage.setItem('id_token', id_token); } }); }); @@ -1038,6 +1042,7 @@ Ext.define('Rambox.view.main.MainController', { Ext.cq1('app-main').getViewModel().set('avatar', profile.picture); }, function() { // Error callback + Ext.Msg.hide(); }); }