Improvements to newfile dialog, open links, other fixes#2277
Conversation
|
|
||
| public static class Format { | ||
| public final @StringRes int format, name; | ||
| public final String ext; |
There was a problem hiding this comment.
Suggestion please make ext / it's handling as regex instead
There was a problem hiding this comment.
These are just meant to be a source of truth, not used for matching etc. i.e. this says ' The canonical extension for markdown is ".md" '
Format and FORMATS is not meant to match or detect formats - that is left to the isFileOutOfThisFormat as before.
| @Override | ||
| public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { | ||
| try { | ||
| if (start < source.length() && dstart <= dest.length() && TextViewUtils.isNewLine(source, start, end)) { |
There was a problem hiding this comment.
Moved some functions from TextViewUtils to GsTextUtils
| public Collection<File> favouriteFiles, recentFiles, popularFiles = null; | ||
| public GsCallback.a1<CharSequence> setTitle = null, setSubtitle = null; | ||
|
|
||
| public GsCallback.a0 refresh = null; |
There was a problem hiding this comment.
Reverted back to just having collections and added a refresh callback here. The refresh callback is called in loadFolder() and can be used to do whatever.
| opts.recentFiles = appSettings.getRecentFiles(); | ||
| opts.popularFiles = appSettings.getPopularFiles(); | ||
| }; | ||
| opts.refresh.callback(); |
There was a problem hiding this comment.
Setting the refresh callback to update sorting, fav file lists etc etc.
|
Broke a few things -> #2297 |

In this PR I have added the ability to format at new file title similarly to how we format snippets.
Additionally, we now remember template and name format per file type.
This should
yyyyMMddHHmmSS)EDIT:
I have merged in my open links in tags PR so more things have been pulled in here: