-
Notifications
You must be signed in to change notification settings - Fork 226
Folder selection in smart folders is fragile #1904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It might be worth adding a custom predicate row template and using NSMenuItem's I can have a look, I have some draft code somewhere that I might be able to repurpose. |
I think another approach could be to strip leading spaces when converting the predicate to xml (which is the canonical representation and gets converted to SQL). |
I actually cannot get @TAKeanice: What about loading predicates back into NSPredicateEditor? If the saved predicate does not match any of the templates, it won't select the option. |
I started a solution which converts from folders in criteria to indented folder names in predicates, and from indented folder names in predicates to folders in criteria. To make it rename resistant, I will use folder IDs in criteria and the XML representation. The last piece of the puzzle I still need to add is a way to convert all predicates on app startup, if something like the folder name change to folder id must be performed. |
Actually, a custom presentation taking in folder IDs and showing them as indented folder names would be cleaner, but it works this way. |
To improve legibility, the smart folder editor indents folder names when it lists the existing folders to choose from:
This is done through the
-fillFolderValueField:atIndent:
method.vienna-rss/Vienna/Sources/Alerts/SmartFolder.m
Lines 262 to 301 in c516ee1
I have identified two issues caused by this:
folderSqlString
function of Criteria+SQL.swift :vienna-rss/Vienna/Sources/Criteria/Criteria+SQL.swift
Lines 151 to 152 in c516ee1
The text was updated successfully, but these errors were encountered: