From 57f497cf634ec5c8a368ee0cff99b3c21ba41311 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 23 Feb 2023 14:04:35 +0100 Subject: [PATCH] isMobile() not used in templates --- dev/View/User/MailBox/MessageList.js | 2 +- dev/View/User/Settings/Pane.js | 1 - plugins/avatars/avatars.js | 7 +------ plugins/avatars/index.php | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 24f970cc8..c995284f1 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -90,7 +90,7 @@ export class MailMessageList extends AbstractViewRight { this.composeInEdit = ComposePopupView.inEdit; - this.isMobile = ThemeStore.isMobile; + this.isMobile = ThemeStore.isMobile; // Obsolete this.leftPanelDisabled = leftPanelDisabled; this.toggleLeftPanel = toggleLeftPanel; diff --git a/dev/View/User/Settings/Pane.js b/dev/View/User/Settings/Pane.js index f4b425294..dccaf9de0 100644 --- a/dev/View/User/Settings/Pane.js +++ b/dev/View/User/Settings/Pane.js @@ -9,7 +9,6 @@ export class SettingsPaneUserView extends AbstractViewRight { constructor() { super(); - this.isMobile = ThemeStore.isMobile; this.leftPanelDisabled = leftPanelDisabled; this.toggleLeftPanel = toggleLeftPanel; } diff --git a/plugins/avatars/avatars.js b/plugins/avatars/avatars.js index fe6855503..4fd61a924 100644 --- a/plugins/avatars/avatars.js +++ b/plugins/avatars/avatars.js @@ -32,8 +32,6 @@ `; }; - let isMobile; - const size = 50, getEl = id => document.getElementById(id), @@ -171,11 +169,9 @@ fn = url=>{element.src = url}; if (url) { fn(url); - } else if (msg.avatar || isMobile()) { + } else if (msg.avatar) { if (msg.avatar?.startsWith('data:')) { fn(msg.avatar); - } else if (isMobile()) { - setIdenticon(from, fn); } else { element.onerror = () => setIdenticon(from, fn); fn(`?Avatar/${'pass' == from.dkimStatus ? 1 : 0}/${msg.avatar}`); @@ -231,7 +227,6 @@ } if ('MailMessageList' === e.detail.viewModelTemplateID) { - isMobile = e.detail.isMobile; getEl('MailMessageList').content.querySelectorAll('.messageCheckbox') .forEach(el => el.append(Element.fromHTML(``))); } diff --git a/plugins/avatars/index.php b/plugins/avatars/index.php index a2c16d611..06f8496e9 100644 --- a/plugins/avatars/index.php +++ b/plugins/avatars/index.php @@ -10,8 +10,8 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin NAME = 'Avatars', AUTHOR = 'SnappyMail', URL = 'https://snappymail.eu/', - VERSION = '1.10', - RELEASE = '2023-02-15', + VERSION = '1.11', + RELEASE = '2023-02-23', REQUIRED = '2.25.0', CATEGORY = 'Contacts', LICENSE = 'MIT',