mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 22:36:34 +00:00
Ktlint for all modules + run it
This commit is contained in:
+1
-2
@@ -22,6 +22,7 @@ import io.element.android.x.matrix.MatrixClient
|
||||
import io.element.android.x.matrix.media.MediaResolver
|
||||
import io.element.android.x.matrix.room.MatrixRoom
|
||||
import io.element.android.x.matrix.timeline.MatrixTimelineItem
|
||||
import kotlin.system.measureTimeMillis
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
@@ -35,7 +36,6 @@ import org.matrix.rustcomponents.sdk.FormattedBody
|
||||
import org.matrix.rustcomponents.sdk.MessageFormat
|
||||
import org.matrix.rustcomponents.sdk.MessageType
|
||||
import timber.log.Timber
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
class MessageTimelineItemStateFactory(
|
||||
private val client: MatrixClient,
|
||||
@@ -198,7 +198,6 @@ class MessageTimelineItemStateFactory(
|
||||
htmlDocument = messageType.content.formatted?.toHtmlDocument()
|
||||
)
|
||||
else -> MessagesTimelineItemUnknownContent
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -101,13 +101,13 @@ import io.element.android.x.features.messages.textcomposer.MessageComposerViewMo
|
||||
import io.element.android.x.features.messages.textcomposer.MessageComposerViewState
|
||||
import io.element.android.x.textcomposer.MessageComposerMode
|
||||
import io.element.android.x.textcomposer.TextComposer
|
||||
import java.lang.Math.random
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import java.lang.Math.random
|
||||
|
||||
@Composable
|
||||
fun MessagesScreen(
|
||||
@@ -116,7 +116,6 @@ fun MessagesScreen(
|
||||
viewModel: MessagesViewModel = mavericksViewModel(argsFactory = { roomId }),
|
||||
composerViewModel: MessageComposerViewModel = mavericksViewModel(argsFactory = { roomId })
|
||||
) {
|
||||
|
||||
fun onSendMessage(textMessage: String) {
|
||||
viewModel.sendMessage(textMessage)
|
||||
composerViewModel.updateText("")
|
||||
|
||||
-1
@@ -76,7 +76,6 @@ fun TimelineItemActionsScreen(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ModalBottomSheetLayout(
|
||||
modifier = modifier,
|
||||
sheetState = modalBottomSheetState,
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ fun MessagesTimelineItemImageView(
|
||||
.aspectRatio(content.aspectRatio),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
|
||||
var isLoading = rememberSaveable(content.imageMeta) { mutableStateOf(true) }
|
||||
val context = LocalContext.current
|
||||
val model = ImageRequest.Builder(context)
|
||||
|
||||
-2
@@ -454,7 +454,6 @@ private fun AnnotatedString.Builder.appendInlineChildrenElements(
|
||||
childNodes: List<Node>,
|
||||
colors: ColorScheme
|
||||
) {
|
||||
|
||||
for (node in childNodes) {
|
||||
when (node) {
|
||||
is TextNode -> {
|
||||
@@ -552,4 +551,3 @@ private fun HtmlText(
|
||||
onLongClick = onLongClick
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -25,6 +25,3 @@ sealed interface MessagesTimelineItemState {
|
||||
val safeSenderName: String = senderDisplayName ?: senderId
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user