diff --git a/app/util/IconLoader.js b/app/util/IconLoader.js index e2b4c952..e3e657c0 100644 --- a/app/util/IconLoader.js +++ b/app/util/IconLoader.js @@ -19,7 +19,7 @@ Ext.define('Rambox.util.IconLoader', { switch (service.type) { case 'slack': webview.executeJavaScript( - "(()=>{let a=document.querySelector('.team_icon');if(!a){const d=document.querySelector('#team_menu');d&&(d.click(),a=document.querySelector('.team_icon'))}if(!a)return!1;const{style:{backgroundImage:b}}=a,c=document.createEvent('MouseEvents');return c.initEvent('mousedown',!0,!0),document.querySelector('.client_channels_list_container').dispatchEvent(c),b.slice(5,-2)})();", + "(a=>window.slackDebug.activeTeam.redux.getState().teams[a].icon.image_44)(window.slackDebug.activeTeamId);", false, function (backgroundImage) { if (backgroundImage) { diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 82c7847f..4276ff2d 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -300,9 +300,7 @@ Ext.define('Rambox.ux.WebView',{ webview.setZoomLevel(me.record.get('zoomLevel')); // Set special icon for some service (like Slack) - setTimeout(function() { - Rambox.util.IconLoader.loadServiceIconUrl(me, webview); - }, 1000); + Rambox.util.IconLoader.loadServiceIconUrl(me, webview); }); // On search text