@@ -109,7 +109,7 @@ var set_message_content = function(path, msg_uid) {
109109 if ( ! path ) {
110110 path = getListPathParam ( ) ;
111111 }
112- Hm_Utils . remove_from_local_storage ( getMessageStorageKey ( msg_uid ) ) ;
112+ Hm_Utils . remove_from_local_storage ( getMessageStorageKey ( msg_uid , path ) ) ;
113113 preFetchMessageContent ( false , msg_uid , path ) ;
114114} ;
115115
@@ -528,7 +528,7 @@ var display_imap_mailbox = function(rows, id, store, checkEmptyState = true) {
528528} ;
529529
530530function preFetchMessageContent ( msgPart , uid , path ) {
531- if ( Hm_Utils . get_from_local_storage ( getMessageStorageKey ( uid ) ) ) {
531+ if ( Hm_Utils . get_from_local_storage ( getMessageStorageKey ( uid , path ) ) ) {
532532 return ;
533533 }
534534 const detail = Hm_Utils . parse_folder_path ( path , 'imap' ) ;
@@ -540,12 +540,12 @@ function preFetchMessageContent(msgPart, uid, path) {
540540 { 'name' : 'folder' , 'value' : detail . folder } ,
541541 { 'name' : 'imap_prefetch' , 'value' : true }
542542 ] , ( res ) => {
543- Hm_Utils . save_to_local_storage ( getMessageStorageKey ( uid ) , JSON . stringify ( res ) ) ;
543+ Hm_Utils . save_to_local_storage ( getMessageStorageKey ( uid , path ) , JSON . stringify ( res ) ) ;
544544 } , null , true )
545545}
546546
547- function getMessageStorageKey ( uid ) {
548- return uid + '_' + getListPathParam ( ) ;
547+ function getMessageStorageKey ( uid , listPath = getListPathParam ( ) ) {
548+ return uid + '_' + listPath ;
549549}
550550
551551async function markPrefetchedMessagesAsRead ( uid ) {
0 commit comments