Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Oct 22, 2024
1 parent fd612c6 commit 82848a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ fun SettingsScreen(
state = lazyListState,
) {
if (state.isLoggedIn) {
item {
itemWithDivider {
Multihop(
isMultihopEnabled = state.useMultihop,
onMultihopClick = onMultihopClick,
)
}
item { Spacer(modifier = Modifier.height(Dimens.cellLabelVerticalPadding)) }
item {
itemWithDivider {
NavigationComposeCell(
title = stringResource(id = R.string.settings_vpn),
onClick = onVpnSettingCellClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ fun LazyListScope.relayListContent(
onSelectRelay: (RelayItem) -> Unit,
onToggleExpand: (RelayItemId, CustomListId?, Boolean) -> Unit,
onUpdateBottomSheetState: (LocationBottomSheetState) -> Unit,
customListHeader: @Composable LazyItemScope.() -> Unit = {
CustomListHeader(
onShowCustomListBottomSheet = {
onUpdateBottomSheetState(
ShowCustomListsBottomSheet(editListEnabled = customLists.isNotEmpty())
)
}
)
},
locationHeader: @Composable LazyItemScope.() -> Unit = {
RelayLocationHeader()
}
) {
itemsIndexed(
items = relayListItems,
Expand All @@ -50,15 +62,16 @@ fun LazyListScope.relayListContent(
}
when (listItem) {
RelayListItem.CustomListHeader ->
CustomListHeader(
/*CustomListHeader(
onShowCustomListBottomSheet = {
onUpdateBottomSheetState(
ShowCustomListsBottomSheet(
editListEnabled = customLists.isNotEmpty()
)
)
}
)
)*/
customListHeader()
is RelayListItem.CustomListItem ->
CustomListItem(
listItem,
Expand Down Expand Up @@ -90,7 +103,7 @@ fun LazyListScope.relayListContent(
},
)
is RelayListItem.CustomListFooter -> CustomListFooter(listItem)
RelayListItem.LocationHeader -> RelayLocationHeader()
RelayListItem.LocationHeader -> locationHeader()//RelayLocationHeader()
is RelayListItem.GeoLocationItem ->
RelayLocationItem(
listItem,
Expand Down

0 comments on commit 82848a2

Please sign in to comment.