mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	| @@ -62,7 +62,7 @@ fun PreferenceRow( | ||||
|             Icon( | ||||
|                 painter = painter, | ||||
|                 modifier = Modifier | ||||
|                     .padding(horizontal = horizontalPadding) | ||||
|                     .padding(start = horizontalPadding, end = 16.dp) | ||||
|                     .size(24.dp), | ||||
|                 tint = MaterialTheme.colorScheme.primary, | ||||
|                 contentDescription = null, | ||||
| @@ -70,7 +70,7 @@ fun PreferenceRow( | ||||
|         } | ||||
|         Column( | ||||
|             Modifier | ||||
|                 .padding(horizontal = horizontalPadding) | ||||
|                 .padding(horizontal = 16.dp) | ||||
|                 .weight(1f), | ||||
|         ) { | ||||
|             Text( | ||||
| @@ -86,7 +86,11 @@ fun PreferenceRow( | ||||
|             } | ||||
|         } | ||||
|         if (action != null) { | ||||
|             Box(Modifier.widthIn(min = 56.dp)) { | ||||
|             Box( | ||||
|                 Modifier | ||||
|                     .widthIn(min = 56.dp) | ||||
|                     .padding(end = horizontalPadding), | ||||
|             ) { | ||||
|                 action() | ||||
|             } | ||||
|         } | ||||
| @@ -106,11 +110,7 @@ fun SwitchPreference( | ||||
|         title = title, | ||||
|         subtitle = subtitle, | ||||
|         painter = painter, | ||||
|         action = { | ||||
|             Switch(checked = preference.value, onCheckedChange = null) | ||||
|             // TODO: remove this once switch checked state is fixed: https://issuetracker.google.com/issues/228336571 | ||||
|             Text(preference.value.toString()) | ||||
|         }, | ||||
|         action = { Switch(checked = preference.value, onCheckedChange = null) }, | ||||
|         onClick = { preference.value = !preference.value }, | ||||
|     ) | ||||
| } | ||||
|   | ||||
| @@ -30,7 +30,7 @@ abstract class ComposeController<P : Presenter<*>>(bundle: Bundle? = null) : | ||||
|             consumeWindowInsets = false | ||||
|             setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) | ||||
|             setContent { | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection(binding.root) | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection() | ||||
|                 TachiyomiTheme { | ||||
|                     ComposeContent(nestedScrollInterop) | ||||
|                 } | ||||
| @@ -56,7 +56,7 @@ abstract class BasicComposeController : | ||||
|             consumeWindowInsets = false | ||||
|             setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) | ||||
|             setContent { | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection(binding.root) | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection() | ||||
|                 TachiyomiTheme { | ||||
|                     ComposeContent(nestedScrollInterop) | ||||
|                 } | ||||
| @@ -79,7 +79,7 @@ abstract class SearchableComposeController<P : BasePresenter<*>>(bundle: Bundle? | ||||
|             consumeWindowInsets = false | ||||
|             setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) | ||||
|             setContent { | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection(binding.root) | ||||
|                 val nestedScrollInterop = rememberNestedScrollInteropConnection() | ||||
|                 TachiyomiTheme { | ||||
|                     ComposeContent(nestedScrollInterop) | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user