Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a535da38 authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

Merge branch '1034-huge-images'

parents 1bb7b283 4cb6bffb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        apply plugin: 'maven'
@@ -20,5 +19,6 @@ allprojects {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
    }
}
+1 −0
Original line number Diff line number Diff line
- 🖼 Downscale and display huge images in preview mode instead of crash (#1034)
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ android {
}

ext {
    markwonVersion = "4.6.1"
    markwonVersion = "4.6.2"
    rxMarkdownVersion = "0.1.3"
}

+2 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import io.noties.markwon.SoftBreakAddsNewLinePlugin;
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
import io.noties.markwon.ext.tables.TablePlugin;
import io.noties.markwon.ext.tasklist.TaskListPlugin;
import io.noties.markwon.image.DefaultDownScalingMediaDecoder;
import io.noties.markwon.image.ImagesPlugin;
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin;
import io.noties.markwon.linkify.LinkifyPlugin;
@@ -77,14 +78,13 @@ public class MarkwonMarkdownViewer extends AppCompatTextView implements Markdown
                .usePlugin(ThemePlugin.create(context))
                .usePlugin(StrikethroughPlugin.create())
                .usePlugin(SimpleExtPlugin.create())
                .usePlugin(ImagesPlugin.create())
                .usePlugin(MarkwonInlineParserPlugin.create())
                .usePlugin(SearchHighlightPlugin.create(context))
                .usePlugin(TablePlugin.create(context))
                .usePlugin(TaskListPlugin.create(context))
                .usePlugin(LinkifyPlugin.create(true))
                .usePlugin(LinkClickInterceptorPlugin.create())
                .usePlugin(ImagesPlugin.create())
                .usePlugin(ImagesPlugin.create(plugin -> plugin.defaultMediaDecoder(DefaultDownScalingMediaDecoder.create(context.getResources().getDisplayMetrics().widthPixels, 0))))
                .usePlugin(SoftBreakAddsNewLinePlugin.create())
                .usePlugin(SyntaxHighlightPlugin.create(prism4j, prism4jTheme))
                .usePlugin(new ToggleableTaskListPlugin((toggledCheckboxPosition, newCheckedState) -> {