Bug 1500826 - Remove broken folderUtils.getFolderFromUri. r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 23 Oct 2018 16:51:23 +1300
changeset 33538 95f2852bdd11a73e492c3b9d088730ff7865167b
parent 33537 bfbeab417a162552a710aa103f3e214587c6e515
child 33539 8072f03fc22d28f8ecefd4dd0dc1b640c78419e0
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1500826
Bug 1500826 - Remove broken folderUtils.getFolderFromUri. r=jorgk
mailnews/base/util/folderUtils.jsm
--- a/mailnews/base/util/folderUtils.jsm
+++ b/mailnews/base/util/folderUtils.jsm
@@ -2,18 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * This file contains helper methods for dealing with nsIMsgFolders.
  */
 
 this.EXPORTED_SYMBOLS = ["getFolderProperties", "getSpecialFolderString",
-                          "getFolderFromUri", "allAccountsSorted",
-                          "getMostRecentFolders", "folderNameCompare"];
+                         "allAccountsSorted", "getMostRecentFolders", "folderNameCompare"];
 
 ChromeUtils.import("resource:///modules/MailServices.jsm");
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
 /**
  * Returns a string representation of a folder's "special" type.
  *
  * @param aFolder  the nsIMsgFolder whose special type should be returned
@@ -104,26 +103,16 @@ function getFolderProperties(aFolder, aO
 
   properties.push("noSelect-" + aFolder.noSelect);
   properties.push("imapShared-" + aFolder.imapShared);
 
   return properties.join(" ");
 }
 
 /**
- * Returns a folder for a particular uri
- *
- * @param aUri  the rdf uri of the folder to return
- */
-function getFolderFromUri(aUri) {
-  return Cc["@mozilla.org/mail/folder-lookup;1"].
-         getService(Ci.nsIFolderLookupService).getFolderById(aUri);
-}
-
-/**
  * Returns the sort order value based on the server type to be used for sorting.
  * The servers (accounts) go in the following order:
  * (0) default account, (1) other mail accounts, (2) Local Folders,
  * (3) IM accounts, (4) RSS, (5) News, (9) others (no server)
  * This ordering is encoded in the .sortOrder property of each server type.
  *
  * @param aServer  the server object to be tested
  */