diff --git a/dev/Common/Cache.js b/dev/Common/Cache.js index 45bf56f48..a433fc772 100644 --- a/dev/Common/Cache.js +++ b/dev/Common/Cache.js @@ -4,7 +4,6 @@ import { isArray } from 'Common/Utils'; let FOLDERS_CACHE = {}, FOLDERS_NAME_CACHE = {}, MESSAGE_FLAGS_CACHE = {}, - REQUESTED_MESSAGE_CACHE = {}, inboxFolderName = 'INBOX'; export const @@ -15,7 +14,6 @@ export const FOLDERS_CACHE = {}; FOLDERS_NAME_CACHE = {}; MESSAGE_FLAGS_CACHE = {}; - REQUESTED_MESSAGE_CACHE = {}; }, /** @@ -25,19 +23,6 @@ export const */ getMessageKey = (folderFullName, uid) => folderFullName + '#' + uid, - /** - * @param {string} folder - * @param {string} uid - */ - addRequestedMessage = (folder, uid) => REQUESTED_MESSAGE_CACHE[getMessageKey(folder, uid)] = true, - - /** - * @param {string} folder - * @param {string} uid - * @returns {boolean} - */ - hasRequestedMessage = (folder, uid) => true === REQUESTED_MESSAGE_CACHE[getMessageKey(folder, uid)], - /** * @returns {string} */ diff --git a/dev/Common/UtilsUser.js b/dev/Common/UtilsUser.js index 832633ffc..16cc748e9 100644 --- a/dev/Common/UtilsUser.js +++ b/dev/Common/UtilsUser.js @@ -1,4 +1,4 @@ -import { MessageFlagsCache, addRequestedMessage } from 'Common/Cache'; +import { MessageFlagsCache } from 'Common/Cache'; import { Notification } from 'Common/Enums'; import { MessageSetAction, ComposeType/*, FolderType*/ } from 'Common/EnumsUser'; import { doc, createElement, elementById, dropdowns, dropdownVisibility } from 'Common/Globals'; @@ -290,7 +290,6 @@ populateMessageBody = (oMessage, preload) => { } */ isNew || message.revivePropertiesFromJson(json); - addRequestedMessage(message.folder, message.uid); if (messagesDom) { let id = 'rl-msg-' + message.hash.replace(/[^a-zA-Z0-9]/g, ''), body = elementById(id); diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 6c1d6265a..b023e0c95 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -24,9 +24,7 @@ import { i18n, initOnStartOrLangChange } from 'Common/Translator'; import { getFolderFromCacheList, - MessageFlagsCache, - hasRequestedMessage, - addRequestedMessage + MessageFlagsCache } from 'Common/Cache'; import { AppUserStore } from 'Stores/User/App'; @@ -61,7 +59,6 @@ export class MailMessageList extends AbstractViewRight { constructor() { super(); - this.bPrefetch = false; this.emptySubjectValue = ''; this.iGoToUpOrDownTimeout = 0; @@ -817,35 +814,6 @@ export class MailMessageList extends AbstractViewRight { addShortcut('arrowright', 'meta', Scope.MessageView, ()=>false); addShortcut('f', 'meta', Scope.MessageList, ()=>this.advancedSearchClick()); - - if (!ThemeStore.isMobile() && SettingsCapa('Prefetch')) { - ifvisible.idle(this.prefetchNextTick.bind(this)); - } - } - - prefetchNextTick() { - if (!this.bPrefetch && !ifvisible.now() && !this.viewModelDom.hidden) { - const message = MessagelistUserStore.find( - item => item && !hasRequestedMessage(item.folder, item.uid) - ); - if (message) { - this.bPrefetch = true; - - addRequestedMessage(message.folder, message.uid); - - Remote.message( - iError => { - const next = !iError; - setTimeout(() => { - this.bPrefetch = false; - next && this.prefetchNextTick(); - }, 1000); - }, - message.folder, - message.uid - ); - } - } } advancedSearchClick() { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index a7e5e2d31..b4a820135 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -1165,7 +1165,6 @@ class Actions 'Kolab' => false, // See Kolab plugin 'MessageActions' => (bool) $oConfig->Get('capa', 'message_actions', true), 'OpenPGP' => (bool) $oConfig->Get('security', 'openpgp', false), - 'Prefetch' => (bool) $oConfig->Get('labs', 'allow_prefetch', false), 'Quota' => (bool) $oConfig->Get('capa', 'quota', true), 'Search' => (bool) $oConfig->Get('capa', 'search', true), 'SearchAdv' => (bool) $oConfig->Get('capa', 'search', true) && $oConfig->Get('capa', 'search_adv', true), diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 94b0a71ce..53d35b524 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -337,7 +337,6 @@ Enables caching in the system'), ), 'labs' => array( - 'allow_prefetch' => array(false), 'cache_system_data' => array(true), 'date_from_headers' => array(true), 'autocreate_system_folders' => array(false), diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php index 528c81c3c..650ac4d10 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php @@ -6,7 +6,6 @@ class Capa { const GNUPG = 'GnuPG'; const OPEN_PGP = 'OpenPGP'; - const PREFETCH = 'Prefetch'; const THEMES = 'Themes'; const USER_BACKGROUND = 'UserBackground'; const SIEVE = 'Sieve';