-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make hyperlinks clickable in markdown previews #5035
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
Conversation
bb2adfa to
163c258
Compare
| Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(link)); | ||
| DisplayUtils.startIntentIfAppAvailable(intent, getActivity(), R.string.no_browser_available); | ||
| } catch (Throwable throwable) { | ||
| Toast.makeText(context, R.string.error_opening_link, Toast.LENGTH_SHORT).show(); |
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.
I prefer snackbar instead of toast?
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.
fine with me, yes. I'll change that
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.
Toast is deprecated in Material Design in favour of Snackbar.
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.
Jupp! 👍
|
@tobiasKaminsky can you please rebase and fix this thing? Your PR #4890 breaks the whole concept here. We only display markdown rendering if it has the right mimetype, which you just killed via your rich-thing PR 😠 |
Idea is to have the same as in office documents or audio/video: I will take care of this. Other than that your PR is working fine 👍 |
That's not the point. Point is your removed/hide the OCFile (I know I can call getFile()) so markdown rendering is always triggered! Markdown should not be triggered for non markdown mimetypes!
Don't know, since we now have TextPreview and TextFilePreview while I haven't checked if both would still do proper markdown rendering and would also just do this in case of markdown present. |
TextPreview is an abstract class, which is used by PreviewTextFile and PreviewTextString I'll take care of it next year. |
163c258 to
154b9af
Compare
Codecov Report
@@ Coverage Diff @@
## master #5035 +/- ##
============================================
+ Coverage 17.7% 17.71% +<.01%
Complexity 3 3
============================================
Files 389 389
Lines 32893 32901 +8
Branches 4627 4627
============================================
+ Hits 5825 5828 +3
- Misses 26115 26117 +2
- Partials 953 956 +3
|
| @ContributesAndroidInjector abstract PreviewTextFragment previewTextFragment(); | ||
|
|
||
| @ContributesAndroidInjector | ||
| abstract PreviewTextFileFragment previewTextFileFragment(); |
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.
Should be one line
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.
This is due to code formatting of Android Studio.
Not sure, if we want to do this then all the time manually, or stick 100% with code formatting and having line wraps…
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.
I'd then say stick with AS code formatting, doing it manually leads to manual work.
AndyScherzinger
left a comment
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.
Looks good to me
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
994f432 to
5fce6ca
Compare
|
Issues
======
- Added 1
See the complete overview on Codacy |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12130.apk |
Codacy548Lint
SpotBugs (new)
SpotBugs (master)
|
f690417 Merge pull request #5102 from nextcloud/removeNC12 051423c remove support for NC12 d7d1c47 Merge pull request #5031 from nextcloud/ezaquarii/fix-npe-crash-when-storage-manager-is-not-set 9b79b85 Merge pull request #5065 from nextcloud/ezaquarii/fix-crash-when-making-new-ods-file 32ebe69 Merge pull request #5066 from nextcloud/ezaquarii/fix-shared-by-null-glitch 6e07d18 Merge pull request #5035 from nextcloud/enh/clickableMarkdownLinks 5fce6ca Removed unneeded try/catch a680697 Removed unneeded try/catch 154b9af adjusted to master a15f724 Make hyperlinks clickable in markdown previews 5f70ea6 Make hyperlinks clickable in markdown previews cd0f834 [tx-robot] updated from transifex 22ab16e [tx-robot] updated from transifex 80d7d26 [tx-robot] updated from transifex 6d76582 [tx-robot] updated from transifex 167b250 Merge pull request #5085 from nextcloud/dependabot/gradle/junit-junit-4.13 7b6e1b7 [tx-robot] updated from transifex 1c12ca0 Bump junit from 4.12 to 4.13 71f919f [tx-robot] updated from transifex fc00d7d Merge pull request #5077 from nextcloud/dependabot/gradle/daggerVersion-2.25.4 9a3bf3a Bump daggerVersion from 2.25.3 to 2.25.4 0c3b8fc [tx-robot] updated from transifex ef84976 Fix "Shared by null" glitch in file details view 3cf3e3b Fix crash when adding new ODS file 2047079 Merge pull request #5060 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.3.0 2882236 Bump detekt-gradle-plugin from 1.2.2 to 1.3.0 3687301 [tx-robot] updated from transifex f53d637 [tx-robot] updated from transifex 24921f6 [tx-robot] updated from transifex c30c6c7 daily dev 20191221

Resolves: #5030