Enable detekt rules TopLevelPropertyNaming and cleanup the code.

This commit is contained in:
Benoit Marty 2023-07-20 17:52:48 +02:00
parent a8ed8b7a59
commit e918d6affd
5 changed files with 16 additions and 17 deletions

View file

@ -42,8 +42,8 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import javax.inject.Inject
private const val backPaginationEventLimit = 20
private const val backPaginationPageSize = 50
private const val BACK_PAGINATION_EVENT_LIMIT = 20
private const val BACK_PAGINATION_PAGE_SIZE = 50
class TimelinePresenter @Inject constructor(
private val timelineItemsFactory: TimelineItemsFactory,
@ -164,6 +164,6 @@ class TimelinePresenter @Inject constructor(
}
private fun CoroutineScope.paginateBackwards() = launch {
timeline.paginateBackwards(backPaginationEventLimit, backPaginationPageSize)
timeline.paginateBackwards(BACK_PAGINATION_EVENT_LIMIT, BACK_PAGINATION_PAGE_SIZE)
}
}

View file

@ -61,7 +61,7 @@ import org.jsoup.nodes.Element
import org.jsoup.nodes.Node
import org.jsoup.nodes.TextNode
private const val chipId = "chip"
private const val CHIP_ID = "chip"
@Composable
fun HtmlDocument(
@ -544,13 +544,13 @@ private fun AnnotatedString.Builder.appendLink(link: Element) {
pop()
}
is PermalinkData.RoomEmailInviteLink -> {
appendInlineContent(chipId, link.ownText())
appendInlineContent(CHIP_ID, link.ownText())
}
is PermalinkData.RoomLink -> {
appendInlineContent(chipId, link.ownText())
appendInlineContent(CHIP_ID, link.ownText())
}
is PermalinkData.UserLink -> {
appendInlineContent(chipId, link.ownText())
appendInlineContent(CHIP_ID, link.ownText())
}
}
}