mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Add: Links' PrefGroup
This commit is contained in:
parent
f35f5a7f9b
commit
21dd99d14b
@ -19,6 +19,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.machiav3lli.fdroid.content.Preferences
|
||||
import com.machiav3lli.fdroid.entity.LinkRef
|
||||
|
||||
@Composable
|
||||
fun PreferenceGroup(
|
||||
@ -63,6 +64,29 @@ fun PreferenceGroup(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PreferenceGroup(
|
||||
modifier: Modifier = Modifier,
|
||||
heading: String? = null,
|
||||
links: List<LinkRef>
|
||||
) {
|
||||
val size = links.size
|
||||
|
||||
PreferenceGroup(
|
||||
modifier = modifier,
|
||||
heading = heading
|
||||
) {
|
||||
links.forEachIndexed { index, item ->
|
||||
LinkPreference(
|
||||
link = item,
|
||||
index = index,
|
||||
groupSize = size,
|
||||
)
|
||||
if (index < size - 1) Spacer(modifier = Modifier.height(4.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PreferenceGroupHeading(
|
||||
heading: String? = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user