File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
app/src/main/kotlin/com/d4rk/cleaner/app/clean/scanner/utils/helpers Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -507,21 +507,19 @@ object FilePreviewHelper {
507
507
val snippet by produceState<String ?>(initialValue = null , file.path) {
508
508
value = loadTextSnippet(file)
509
509
}
510
- if ( snippet != null ) {
510
+ snippet?. let {
511
511
Text (
512
- text = snippet !! ,
512
+ text = it ,
513
513
style = MaterialTheme .typography.labelSmall,
514
514
maxLines = 3 ,
515
515
overflow = TextOverflow .Ellipsis ,
516
516
modifier = modifier
517
517
)
518
- } else {
519
- Icon (
520
- painter = painterResource(id = R .drawable.ic_unknown_document),
521
- contentDescription = null ,
522
- modifier = modifier.size(24 .dp)
523
- )
524
- }
518
+ } ? : Icon (
519
+ painter = painterResource(id = R .drawable.ic_unknown_document),
520
+ contentDescription = null ,
521
+ modifier = modifier.size(24 .dp)
522
+ )
525
523
}
526
524
527
525
PreviewType .Archive -> {
You can’t perform that action at this time.
0 commit comments