From 0db1d98f41d8d149c3c5a9f4c14e1313c3fe9eb2 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Mar 2019 18:56:18 +0100 Subject: [PATCH] Fix compilation issue --- .../features/html/EventHtmlRenderer.kt | 24 +++++++++---------- app/src/main/res/values-ldrtl/styles.xml | 8 ------- .../room/timeline/FakePaginationTask.kt | 4 +--- 3 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 app/src/main/res/values-ldrtl/styles.xml diff --git a/app/src/main/java/im/vector/riotredesign/features/html/EventHtmlRenderer.kt b/app/src/main/java/im/vector/riotredesign/features/html/EventHtmlRenderer.kt index 2ecee795..15843d8a 100644 --- a/app/src/main/java/im/vector/riotredesign/features/html/EventHtmlRenderer.kt +++ b/app/src/main/java/im/vector/riotredesign/features/html/EventHtmlRenderer.kt @@ -73,40 +73,40 @@ private class MatrixPlugin private constructor(private val glideRequests: GlideR override fun configureHtmlRenderer(builder: MarkwonHtmlRenderer.Builder) { builder - .addHandler( + .setHandler( "img", ImageHandler.create()) - .addHandler( + .setHandler( "a", MxLinkHandler(glideRequests, context, session)) - .addHandler( + .setHandler( "blockquote", BlockquoteHandler()) - .addHandler( + .setHandler( "sub", SubScriptHandler()) - .addHandler( + .setHandler( "sup", SuperScriptHandler()) - .addHandler( + .setHandler( asList("b", "strong"), StrongEmphasisHandler()) - .addHandler( + .setHandler( asList("s", "del"), StrikeHandler()) - .addHandler( + .setHandler( asList("u", "ins"), UnderlineHandler()) - .addHandler( + .setHandler( asList("ul", "ol"), ListHandler()) - .addHandler( + .setHandler( asList("i", "em", "cite", "dfn"), EmphasisHandler()) - .addHandler( + .setHandler( asList("h1", "h2", "h3", "h4", "h5", "h6"), HeadingHandler()) - .addHandler("mx-reply", + .setHandler("mx-reply", MxReplyTagHandler()) } diff --git a/app/src/main/res/values-ldrtl/styles.xml b/app/src/main/res/values-ldrtl/styles.xml deleted file mode 100644 index c10be96c..00000000 --- a/app/src/main/res/values-ldrtl/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/session/room/timeline/FakePaginationTask.kt b/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/session/room/timeline/FakePaginationTask.kt index fe42fea3..5b00582b 100644 --- a/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/session/room/timeline/FakePaginationTask.kt +++ b/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/session/room/timeline/FakePaginationTask.kt @@ -18,17 +18,15 @@ package im.vector.matrix.android.session.room.timeline import arrow.core.Try import im.vector.matrix.android.internal.session.room.timeline.PaginationTask -import im.vector.matrix.android.internal.session.room.timeline.TokenChunkEvent import im.vector.matrix.android.internal.session.room.timeline.TokenChunkEventPersistor import kotlin.random.Random internal class FakePaginationTask(private val tokenChunkEventPersistor: TokenChunkEventPersistor) : PaginationTask { - override fun execute(params: PaginationTask.Params): Try { + override fun execute(params: PaginationTask.Params): Try { val fakeEvents = RoomDataHelper.createFakeListOfEvents(30) val tokenChunkEvent = FakeTokenChunkEvent(params.from, Random.nextLong(System.currentTimeMillis()).toString(), fakeEvents) return tokenChunkEventPersistor.insertInDb(tokenChunkEvent, params.roomId, params.direction) - .map { tokenChunkEvent } } }