Removed the DATA_IMAGE_USER_DOT_PIC

Because viewUserPic is always false due to the removed Gravatar feature
This commit is contained in:
djmaze 2020-09-30 16:10:01 +02:00
parent 98c6fa0675
commit cfdbe3251e
9 changed files with 44 additions and 93 deletions

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { DATA_IMAGE_USER_DOT_PIC, UNUSED_OPTION_VALUE } from 'Common/Consts';
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
import {
Capa,
@ -27,7 +27,7 @@ import Audio from 'Common/Audio';
import { i18n } from 'Common/Translator';
import { attachmentDownload } from 'Common/Links';
import { getUserPic, storeMessageFlagsToCache } from 'Common/Cache';
import { storeMessageFlagsToCache } from 'Common/Cache';
import AppStore from 'Stores/User/App';
import SettingsStore from 'Stores/User/Settings';
@ -53,8 +53,6 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
constructor() {
super();
let lastEmail = '';
const createCommandReplyHelper = type =>
createCommand(() => {
this.lastReplyAction(type);
@ -188,8 +186,6 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
this.viewViewLink = ko.observable('');
this.viewUnsubscribeLink = ko.observable('');
this.viewDownloadLink = ko.observable('');
this.viewUserPic = ko.observable(DATA_IMAGE_USER_DOT_PIC);
this.viewUserPicVisible = ko.observable(false);
this.viewIsImportant = ko.observable(false);
this.viewIsFlagged = ko.observable(false);
@ -254,18 +250,6 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
this.viewDownloadLink(message.downloadLink());
this.viewIsImportant(message.isImportant());
this.viewIsFlagged(message.flagged());
lastEmail = message.fromAsSingleEmail();
getUserPic(lastEmail, (pic, email) => {
if (pic !== this.viewUserPic() && lastEmail === email) {
this.viewUserPicVisible(false);
this.viewUserPic(DATA_IMAGE_USER_DOT_PIC);
if (pic) {
this.viewUserPicVisible(true);
this.viewUserPic(pic);
}
}
});
} else {
this.viewFolder = '';
this.viewUid = '';