-
Notifications
You must be signed in to change notification settings - Fork 365
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
Navigation and highlighting improvements #2377
Navigation and highlighting improvements #2377
Conversation
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserDialog.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java
Show resolved
Hide resolved
loadFolder(_dopt.startFolder != null ? _dopt.startFolder : _dopt.rootFolder, null); | ||
} | ||
|
||
public Map<File, File> getVirtualFolders() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Populate virtual folders at start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't find the issue, but I recall there being topics about virtual lists not outdated
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/markor/frontend/textview/SyntaxHighlighterBase.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/GsSearchOrCustomTextDialog.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserDialog.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java
Show resolved
Hide resolved
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java
Show resolved
Hide resolved
@@ -224,7 +224,7 @@ protected void afterOnCreate(Bundle savedInstances, Context context) { | |||
if (_editor != null && _linkCheckBox != null) { | |||
doUpdatePreferences(); | |||
_linkCheckBox.setVisibility(hasLinks(_editor.getText()) ? View.VISIBLE : View.GONE); | |||
_linkCheckBox.setChecked(true); | |||
_linkCheckBox.setChecked(_appSettings.getFormatShareAsLink()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember share option
@@ -474,36 +474,48 @@ public static void runRegexReplaceAction(final Editable editable, final ReplaceP | |||
|
|||
private static void runRegexReplaceAction(final Editable editable, final List<ReplacePattern> patterns) { | |||
|
|||
TextViewUtils.withKeepSelection(editable, (selStart, selEnd) -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got rid of this method - we use it rarely and it replaces 3 lines of code
TextViewUtils.withKeepSelection(editable, (selStart, selEnd) -> { | ||
final int[] sel = TextViewUtils.getSelection(editable); | ||
if (sel[0] < 0) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sel[0] < 0 means invalid / no selection.
We were not testing for this which means actions were likely silently failing. Added these tests
_title = GsFileUtils.getFilenameWithoutExtension(_file); | ||
_fileExtension = GsFileUtils.getFilenameExtension(_file); | ||
public Document(@NonNull final File f) { | ||
path = getPath(f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the canonical path always. Absolute path can include ../
@@ -299,4 +318,30 @@ public void onStart() { | |||
w.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT); | |||
} | |||
} | |||
|
|||
private static void setSubtitleApprearance(final Toolbar toolbar) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find and set a dialog subtitle appearance. This is a little hacky but it works correctly every time.
@gsantner Do you know why this build is failing? |
Seems that either a repository went down under, or GitHub actions has network issues (which also happens from time to time). It would be weird if suddenly two libraries would go to nirvana on it's own.
|
Also now included are fixes for the build failing. @gsantner this is ready to merge |
implementation 'com.github.AppIntro:AppIntro:6.2.0' | ||
implementation 'com.kailashdabhi:om-recorder:1.1.5' | ||
implementation 'com.github.kailash09dabhi:OmRecorder:1.1.5' | ||
implementation 'com.github.mertakdut:EpubParser:1.0.95' | ||
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for checking the new installation options and fixing it
Thanks, merging |
…ntner#2409 closes gsantner#2410) * Many fixes to navigation and go back * Cleanups to fragment handling * Tweaks to showing keyboard * Final tweaks to activity stacks * Removed unnecessary 'synchronized' calls for perf * Tweaks to highlighting * Reverted some highlighting changes * Fix template cursor start * Improvements to display of file browser dialog / fragment * Initial set of changes for async * Using canonical paths and and static members * Defensive logic for indices * Batching fixup for reduced computation * Switching back to start end as it made no difference * Tweaks to launching; file paths -> canonical * Fixed wikitext link formatting (cherry picked from commit c5fe529)
This adds several improvements to file browsing and navigation
Todo:
I have also added other things to this PR now