"Empty Folders" option - mistakenly detects rss-folders as empty.
perdolka opened this issue · 6 comments
I am afraid that this is a CANTFIX:
The bookmark API
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks/BookmarkTreeNode
does not provide any further information on the type of folders.
Currently, all bookmarks are filtered which according to the API mentioned above
- contain a uri, or
- have no parent (to recognize at least "top-level" special type folders), or
- have some children, or
- are marked as unmodifiable, or
- have a type specified which is different from "folder"
I suppose that filtering some "magic names" (which might differ in different languages) is a bad idea.
If you have an idea how this can be properly fixed, please let me know.
I found this:
https://bugzilla.mozilla.org/show_bug.cgi?id=1276821
https://bugzilla.mozilla.org/show_bug.cgi?id=1393654
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Using_the_Places_livemark_service
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Feed_content_access_API
https://developer.mozilla.org/en-US/Firefox/Releases/2/Adding_feed_readers_to_Firefox
There is no solution, but maybe it will help.
I do not know if this solves the problem, but it can be a good approximation to use it:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks/BookmarkTreeNodeType
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks/BookmarkTreeNode
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks
You only need to know if a feed considers it a URL or a folder.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmark/BookmarkTreeNodeType
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks/BookmarkTreeNode
This is already checked: As mentioned, if the type is defined and different from "folder" the bookmark is ignored (for the folder view). Also if any nonempty url is specified, the bookmark is ignored.
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Using_the_Places_livemark_service
This looks promising, but Components.classes["@mozilla.org/browser/livemark-service;2"] looks like this is about to be obsoleted (and/or special permissions are required to use it). I will check whether the obvious code works.
No, I won't try:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsILivemarkService
shows a big fat: Warning: This interface is obsolete.
If I understand the other bugreports correctly, livemarks will be completely removed eventually (I guess some WebExtensions should be used instead), so perhaps this problem will solve itself with some future firefox versions.
I think everything possible has been done to communicate the problem (which seems unsolvable with the current bookmark API).
Therefore, I am closing this bug for the moment.