File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -218,25 +218,30 @@ private fun LineRow(
218218private fun String.toColor (colorationMode : ColorationMode ): Color {
219219 return when (colorationMode) {
220220 ColorationMode .Logcat -> when (getOrNull(31 )) {
221- ' D' -> Color ( 0xFF299999 )
222- ' I' -> Color ( 0xFFABC023 )
223- ' W' -> Color ( 0xFFBBB529 )
224- ' E' -> Color ( 0xFFFF6B68 )
225- ' A' -> Color ( 0xFFFF6B68 )
221+ ' D' -> colorDebug
222+ ' I' -> colorInfo
223+ ' W' -> colorWarning
224+ ' E' -> colorError
225+ ' A' -> colorError
226226 else -> ElementTheme .colors.textPrimary
227227 }
228228 ColorationMode .RustLogs -> when (getOrNull(32 )) {
229229 ' E' -> ElementTheme .colors.textPrimary
230- ' G' -> Color ( 0xFF299999 )
231- ' 0' -> Color ( 0xFFABC023 )
232- ' N' -> Color ( 0xFFBBB529 )
233- ' R' -> Color ( 0xFFFF6B68 )
230+ ' G' -> colorDebug
231+ ' 0' -> colorInfo
232+ ' N' -> colorWarning
233+ ' R' -> colorError
234234 else -> ElementTheme .colors.textPrimary
235235 }
236236 ColorationMode .None -> ElementTheme .colors.textPrimary
237237 }
238238}
239239
240+ private val colorDebug = Color (0xFF299999 )
241+ private val colorInfo = Color (0xFFABC023 )
242+ private val colorWarning = Color (0xFFBBB529 )
243+ private val colorError = Color (0xFFFF6B68 )
244+
240245@PreviewsDayNight
241246@Composable
242247internal fun ViewFileViewPreview (@PreviewParameter(ViewFileStateProvider ::class ) state : ViewFileState ) = ElementPreview {
You can’t perform that action at this time.
0 commit comments