mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
isMobile() not used in templates
This commit is contained in:
parent
e1833ae032
commit
57f497cf63
|
@ -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;
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ export class SettingsPaneUserView extends AbstractViewRight {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.isMobile = ThemeStore.isMobile;
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
this.toggleLeftPanel = toggleLeftPanel;
|
||||
}
|
||||
|
|
|
@ -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">`)));
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue