From a35255d838b96af9463141c929eb81acbdb80878 Mon Sep 17 00:00:00 2001 From: Stefan Niedermann Date: Mon, 4 Jan 2021 12:12:24 +0100 Subject: [PATCH] Use native Linkify flag --- .../java/it/niedermann/owncloud/notes/NotesApplication.java | 2 +- .../android/markdown/markwon/MarkwonMarkdownUtil.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java b/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java index c35205e8..143ddb64 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java @@ -73,7 +73,7 @@ public class NotesApplication extends Application { } public static boolean isDarkThemeActive(Context context) { - int uiMode = context.getResources().getConfiguration().uiMode; + final int uiMode = context.getResources().getConfiguration().uiMode; return (uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; } diff --git a/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownUtil.java b/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownUtil.java index e6d22e97..d6068a9f 100644 --- a/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownUtil.java +++ b/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownUtil.java @@ -71,7 +71,7 @@ public class MarkwonMarkdownUtil { return initMarkwonEditor(context) .usePlugin(TablePlugin.create(context)) .usePlugin(TaskListPlugin.create(context)) - .usePlugin(LinkifyPlugin.create()) + .usePlugin(LinkifyPlugin.create(true)) .usePlugin(ImagesPlugin.create()) .usePlugin(SyntaxHighlightPlugin.create(prism4j, prism4jTheme)); } @@ -82,7 +82,7 @@ public class MarkwonMarkdownUtil { } private static boolean isDarkThemeActive(@NonNull Context context) { - int uiMode = context.getResources().getConfiguration().uiMode; + final int uiMode = context.getResources().getConfiguration().uiMode; return (uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; }