File tree Expand file tree Collapse file tree
app/src/main/java/app/revanced/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ data class CompatiblePackage(
6666@Immutable
6767data class Option <T >(
6868 val name : String ,
69- val description : String ,
69+ val description : String? ,
7070 val required : Boolean ,
7171 val type : KType ,
7272 val default : T ? ,
@@ -75,7 +75,7 @@ data class Option<T>(
7575) {
7676 constructor (option: PatchOption <T >) : this (
7777 option.name,
78- option.description.orEmpty() ,
78+ option.description,
7979 option.required,
8080 option.type,
8181 option.default,
Original file line number Diff line number Diff line change @@ -312,10 +312,12 @@ fun PatchItem(
312312 style = MaterialTheme .typography.titleMedium,
313313 color = MaterialTheme .colorScheme.primary
314314 )
315- Text (
316- text = option.description,
317- style = MaterialTheme .typography.bodyMedium
318- )
315+ option.description?.let {
316+ Text (
317+ text = it,
318+ style = MaterialTheme .typography.bodyMedium
319+ )
320+ }
319321 }
320322 }
321323 }
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ fun <T : Any> OptionItem(
279279 } else null ,
280280 supportingContent = {
281281 Column (verticalArrangement = Arrangement .spacedBy(8 .dp)) {
282- Text ( option.description)
282+ option.description?. let { Text (it) }
283283
284284 OptionDropdownSection (
285285 option = option,
@@ -507,7 +507,7 @@ private fun ListOptionItem(
507507 } else null ,
508508 supportingContent = {
509509 Column (verticalArrangement = Arrangement .spacedBy(16 .dp)) {
510- Text ( option.description)
510+ option.description?. let { Text (it) }
511511 if (option.required && value == null ) {
512512 Text (
513513 style = MaterialTheme .typography.labelLargeEmphasized,
@@ -562,7 +562,7 @@ private fun InvalidListWarningDialog(
562562 Text (stringResource(R .string.patch_options_value_list_invalid_dialog_description))
563563 ListItem (
564564 headlineContent = { OptionItemHeadline (option) },
565- supportingContent = { Text ( option.description) },
565+ supportingContent = { option.description?. let { Text (it) } },
566566 colors = transparentListItemColors,
567567 )
568568 }
You can’t perform that action at this time.
0 commit comments