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.composeInEdit = ComposePopupView.inEdit;
|
||||||
|
|
||||||
this.isMobile = ThemeStore.isMobile;
|
this.isMobile = ThemeStore.isMobile; // Obsolete
|
||||||
this.leftPanelDisabled = leftPanelDisabled;
|
this.leftPanelDisabled = leftPanelDisabled;
|
||||||
this.toggleLeftPanel = toggleLeftPanel;
|
this.toggleLeftPanel = toggleLeftPanel;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ export class SettingsPaneUserView extends AbstractViewRight {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.isMobile = ThemeStore.isMobile;
|
|
||||||
this.leftPanelDisabled = leftPanelDisabled;
|
this.leftPanelDisabled = leftPanelDisabled;
|
||||||
this.toggleLeftPanel = toggleLeftPanel;
|
this.toggleLeftPanel = toggleLeftPanel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
</svg>`;
|
</svg>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
let isMobile;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
size = 50,
|
size = 50,
|
||||||
getEl = id => document.getElementById(id),
|
getEl = id => document.getElementById(id),
|
||||||
|
@ -171,11 +169,9 @@
|
||||||
fn = url=>{element.src = url};
|
fn = url=>{element.src = url};
|
||||||
if (url) {
|
if (url) {
|
||||||
fn(url);
|
fn(url);
|
||||||
} else if (msg.avatar || isMobile()) {
|
} else if (msg.avatar) {
|
||||||
if (msg.avatar?.startsWith('data:')) {
|
if (msg.avatar?.startsWith('data:')) {
|
||||||
fn(msg.avatar);
|
fn(msg.avatar);
|
||||||
} else if (isMobile()) {
|
|
||||||
setIdenticon(from, fn);
|
|
||||||
} else {
|
} else {
|
||||||
element.onerror = () => setIdenticon(from, fn);
|
element.onerror = () => setIdenticon(from, fn);
|
||||||
fn(`?Avatar/${'pass' == from.dkimStatus ? 1 : 0}/${msg.avatar}`);
|
fn(`?Avatar/${'pass' == from.dkimStatus ? 1 : 0}/${msg.avatar}`);
|
||||||
|
@ -231,7 +227,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('MailMessageList' === e.detail.viewModelTemplateID) {
|
if ('MailMessageList' === e.detail.viewModelTemplateID) {
|
||||||
isMobile = e.detail.isMobile;
|
|
||||||
getEl('MailMessageList').content.querySelectorAll('.messageCheckbox')
|
getEl('MailMessageList').content.querySelectorAll('.messageCheckbox')
|
||||||
.forEach(el => el.append(Element.fromHTML(`<img class="fromPic" data-bind="fromPic:$data" loading="lazy">`)));
|
.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',
|
NAME = 'Avatars',
|
||||||
AUTHOR = 'SnappyMail',
|
AUTHOR = 'SnappyMail',
|
||||||
URL = 'https://snappymail.eu/',
|
URL = 'https://snappymail.eu/',
|
||||||
VERSION = '1.10',
|
VERSION = '1.11',
|
||||||
RELEASE = '2023-02-15',
|
RELEASE = '2023-02-23',
|
||||||
REQUIRED = '2.25.0',
|
REQUIRED = '2.25.0',
|
||||||
CATEGORY = 'Contacts',
|
CATEGORY = 'Contacts',
|
||||||
LICENSE = 'MIT',
|
LICENSE = 'MIT',
|
||||||
|
|
Loading…
Reference in a new issue