isMobile() not used in templates

This commit is contained in:
the-djmaze 2023-02-23 14:04:35 +01:00
parent e1833ae032
commit 57f497cf63
4 changed files with 4 additions and 10 deletions

View file

@ -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;

View file

@ -9,7 +9,6 @@ export class SettingsPaneUserView extends AbstractViewRight {
constructor() {
super();
this.isMobile = ThemeStore.isMobile;
this.leftPanelDisabled = leftPanelDisabled;
this.toggleLeftPanel = toggleLeftPanel;
}

View file

@ -32,8 +32,6 @@
</svg>`;
};
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(`<img class="fromPic" data-bind="fromPic:$data" loading="lazy">`)));
}

View file

@ -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',