use the folderURI parameter when loading Account central
Categories
(MailNews Core :: Account Manager, enhancement)
Tracking
(Not tracked)
People
(Reporter: aceman, Assigned: aceman)
References
Details
Attachments
(2 files, 2 obsolete files)
4.15 KB,
patch
|
iannbugzilla
:
review+
|
Details | Diff | Splinter Review |
11.00 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
In bug 1579575 we added a folderURI argument (containing the selected folder) to the URL used to load msgAccountCentral.xul. But the code in that page ignores it and tried to find the currently selected folder itself.
We can use the argument and simplify the msgAccountCentral.js a bit.
This could do it. I also pass the selected folder to the various functions called from the Account central so that again they do not need to find out which folder is selected (using various differing methods). Just pass what we already have displayed to be sure what gets used in those functions (like MsgFilters, MsgSearchMessages).
For this to work, Seamonkey also needs to pass the folderURI similarly to TB (bug 1579575).
Sorry, more places call ShowAccountCentral().
Comment 4•5 years ago
|
||
Comment on attachment 9091540 [details] [diff] [review] 1579987.patch I really know nothing about this stuff, sorry. And even with my f+, you'd still get a review somewhere.
Comment on attachment 9091540 [details] [diff] [review] 1579987.patch Using uris like this solves a lot of problems. If there were a back/forward cache or history like in a browser there might be unexpected consequences, but I think here it's fine. ``` --- a/mailnews/base/content/msgAccountCentral.js +++ b/mailnews/base/content/msgAccountCentral.js @@ -4,77 +4,82 @@ var selectedServer = null; +var selectedFolder = null; Didn't these globals used to be gSelectedFolder style? Made it easier. Up to you. -function ArrangeAccountCentralItems(server, msgFolder) { +function ArrangeAccountCentralItems() { let exceptions = []; let protocolInfo = null; + let server = selectedFolder ? selectedFolder.server : null; Wasn't selectedServer already set up? ```
Good catch, thank you.
Comment on attachment 9091545 [details] [diff] [review] 1579987-SM.patch v1.1 LGTM r=me
Updated•5 years ago
|
Comment 9•5 years ago
|
||
I'm agonising over the commit message here:
use the passed folderURI argument passed into Account Central
doesn't seem OK. It's not an argument and it's not passed. We get it here:
let folderURI = document.location.search.replace("?folderURI=", "");
Something along the lines of
Use document URL's folderURI query/search(?) part when loading Account Central
But .location is not an nsIURI, it seems to the the href (string). And no idea what .search is, apparently the search/query part of that string. Where are these properties defined?
Comment 10•5 years ago
|
||
OK, location and search are here:
https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/webidl/Document.webidl#121
https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/webidl/Location.webidl#38
So how about:
Use folderURI from document's location.search when loading Account Central
Comment 11•5 years ago
|
||
Well it's called an url parameter
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #9)
But .location is not an nsIURI, it seems to the the href (string). And no idea what .search is, apparently the search/query part of that string. Where are these properties defined?
I looked here: https://developer.mozilla.org/en-US/docs/Web/API/Location
Comment 13•5 years ago
|
||
Thanks guys, but no one answered the question:
Well it's called an url parameter
Where?
So how about: Use folderURI from document's location.search when loading Account Central
So is that OK?
Assignee | ||
Comment 14•5 years ago
|
||
They also call it a parameter at the link I provided.
"Use folderURI parameter from document's location.search when loading Account Central" ?
Comment 15•5 years ago
|
||
Sold!
Comment 16•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/afad3a7d34eb
Use folderURI parameter from document's location.search when loading Account Central. r=mkmelin
https://hg.mozilla.org/comm-central/rev/dff2395d386f
Use folderURI parameter from document's location.search when loading Account Central - SeaMonkey part. r=IanN
Updated•5 years ago
|
Comment 17•5 years ago
|
||
Hmm, this would have been a beta candidate since bug 1579575 got uplifted.
Description
•