Bug 1728703 - Remove redundant nsMsgDBFolder::GetOfflineMsgFolder(). r=mkmelin
Also removes getOfflineMsgFolder() from nsIMsgFolder as the only implementation is internal to nsImapMailFolder. Differential Revision: https://phabricator.services.mozilla.com/D124286 --HG-- extra : amend_source : 2568f722bbb0164c12aa45e06a79d3c9e8d896d0
This commit is contained in:
Родитель
72c2f9a280
Коммит
a55334b4ed
|
@ -591,14 +591,6 @@ interface nsIMsgFolder : nsISupports {
|
|||
out long long aOffset,
|
||||
out unsigned long aSize);
|
||||
|
||||
/**
|
||||
* Get the folder where the msg could be present.
|
||||
* @param msgKey key of the msg for which we are trying to get the folder;
|
||||
* @returns aMsgFolder required folder;
|
||||
*
|
||||
*/
|
||||
nsIMsgFolder GetOfflineMsgFolder(in nsMsgKey msgKey);
|
||||
|
||||
/**
|
||||
* Get an offline store output stream for the passed message header.
|
||||
*
|
||||
|
|
|
@ -1218,30 +1218,6 @@ NS_IMETHODIMP nsMsgDBFolder::HasMsgOffline(nsMsgKey msgKey, bool* result) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgDBFolder::GetOfflineMsgFolder(nsMsgKey msgKey,
|
||||
nsIMsgFolder** aMsgFolder) {
|
||||
NS_ENSURE_ARG_POINTER(aMsgFolder);
|
||||
nsCOMPtr<nsIMsgFolder> subMsgFolder;
|
||||
GetDatabase();
|
||||
if (!mDatabase) return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIMsgDBHdr> hdr;
|
||||
nsresult rv = mDatabase->GetMsgHdrForKey(msgKey, getter_AddRefs(hdr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (hdr) {
|
||||
uint32_t msgFlags = 0;
|
||||
hdr->GetFlags(&msgFlags);
|
||||
// Check if we already have this message body offline
|
||||
if ((msgFlags & nsMsgMessageFlags::Offline)) {
|
||||
NS_IF_ADDREF(*aMsgFolder = this);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
// it's okay to not get a folder. Folder is remain unchanged in that case.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgDBFolder::GetFlags(uint32_t* _retval) {
|
||||
ReadDBFolderInfo(false);
|
||||
*_retval = mFlags;
|
||||
|
|
|
@ -8739,8 +8739,8 @@ NS_IMETHODIMP nsImapMailFolder::HasMsgOffline(nsMsgKey msgKey, bool* _retval) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::GetOfflineMsgFolder(nsMsgKey msgKey,
|
||||
nsIMsgFolder** aMsgFolder) {
|
||||
nsresult nsImapMailFolder::GetOfflineMsgFolder(nsMsgKey msgKey,
|
||||
nsIMsgFolder** aMsgFolder) {
|
||||
// Check if we have the message in the current folder.
|
||||
NS_ENSURE_ARG_POINTER(aMsgFolder);
|
||||
nsCOMPtr<nsIMsgFolder> subMsgFolder;
|
||||
|
|
|
@ -353,17 +353,6 @@ class nsImapMailFolder : public nsMsgDBFolder,
|
|||
NS_IMETHOD SetFilterList(nsIMsgFilterList* aMsgFilterList) override;
|
||||
NS_IMETHOD GetCustomIdentity(nsIMsgIdentity** aIdentity) override;
|
||||
|
||||
/**
|
||||
* This method is used to locate a folder where a msg could be present, not
|
||||
* just the folder where the message first arrives, this method searches for
|
||||
* the existence of msg in all the folders/labels that we retrieve from
|
||||
* X-GM-LABELS also. overrides nsMsgDBFolder::GetOfflineMsgFolder()
|
||||
* @param msgKey key of the msg for which we are trying to get the folder;
|
||||
* @param aMsgFolder required folder;
|
||||
*/
|
||||
NS_IMETHOD GetOfflineMsgFolder(nsMsgKey msgKey,
|
||||
nsIMsgFolder** aMsgFolder) override;
|
||||
|
||||
NS_IMETHOD GetIncomingServerType(nsACString& serverType) override;
|
||||
|
||||
nsresult AddSubfolderWithPath(nsAString& name, nsIFile* dbPath,
|
||||
|
@ -602,5 +591,14 @@ class nsImapMailFolder : public nsMsgDBFolder,
|
|||
void DeleteStoreMessages(const nsTArray<nsMsgKey>& aMessages);
|
||||
static void DeleteStoreMessages(const nsTArray<nsMsgKey>& aMessages,
|
||||
nsIMsgFolder* aFolder);
|
||||
/**
|
||||
* This method is used to locate a folder where a msg could be present, not
|
||||
* just the folder where the message first arrives, this method searches for
|
||||
* the existence of msg in all the folders/labels that we retrieve from
|
||||
* X-GM-LABELS also. overrides nsMsgDBFolder::GetOfflineMsgFolder()
|
||||
* @param msgKey key of the msg for which we are trying to get the folder;
|
||||
* @param aMsgFolder required folder;
|
||||
*/
|
||||
nsresult GetOfflineMsgFolder(nsMsgKey msgKey, nsIMsgFolder** aMsgFolder);
|
||||
};
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче