mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3310 Spaces | Fix | Fix menu for updating space icon (#2048)
This commit is contained in:
parent
5ae50001db
commit
f5f8f7df4d
20 changed files with 35 additions and 37 deletions
|
@ -47,7 +47,6 @@ import androidx.compose.ui.text.font.FontWeight
|
|||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.VisualTransformation
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
@ -491,7 +490,7 @@ fun ProfileImageBlock(
|
|||
},
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.profile_settings_remove_image),
|
||||
text = stringResource(R.string.remove_image),
|
||||
style = BodyRegular,
|
||||
color = colorResource(id = R.color.text_primary)
|
||||
)
|
||||
|
|
|
@ -42,7 +42,7 @@ fun SpaceHeader(
|
|||
icon: SpaceIconView?,
|
||||
modifier: Modifier = Modifier,
|
||||
onNameSet: (String) -> Unit,
|
||||
onRandomGradientClicked: () -> Unit,
|
||||
onRemoveIconClicked: () -> Unit,
|
||||
isEditEnabled: Boolean,
|
||||
onSpaceImagePicked: (Uri) -> Unit
|
||||
) {
|
||||
|
@ -90,18 +90,6 @@ fun SpaceHeader(
|
|||
isSpaceIconMenuExpanded.value = false
|
||||
}
|
||||
) {
|
||||
DropdownMenuItem(
|
||||
onClick = {
|
||||
onRandomGradientClicked()
|
||||
isSpaceIconMenuExpanded.value = false
|
||||
},
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.space_settings_apply_random_gradient),
|
||||
style = BodyRegular,
|
||||
color = colorResource(id = R.color.text_primary)
|
||||
)
|
||||
}
|
||||
if (ActivityResultContracts.PickVisualMedia.isPhotoPickerAvailable(context)) {
|
||||
Divider(
|
||||
thickness = 0.5.dp,
|
||||
|
@ -124,6 +112,18 @@ fun SpaceHeader(
|
|||
)
|
||||
}
|
||||
}
|
||||
DropdownMenuItem(
|
||||
onClick = {
|
||||
onRemoveIconClicked()
|
||||
isSpaceIconMenuExpanded.value = false
|
||||
},
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.remove_image),
|
||||
style = BodyRegular,
|
||||
color = colorResource(id = R.color.text_primary)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ fun SpaceSettingsScreen(
|
|||
onNetworkIdClicked: (Id) -> Unit,
|
||||
onCreatedByClicked: (Id) -> Unit,
|
||||
onDebugClicked: () -> Unit,
|
||||
onRandomGradientClicked: () -> Unit,
|
||||
onRemoveIconClicked: () -> Unit,
|
||||
onSharePrivateSpaceClicked: () -> Unit,
|
||||
onManageSharedSpaceClicked: () -> Unit,
|
||||
onAddMoreSpacesClicked: () -> Unit,
|
||||
|
@ -91,7 +91,7 @@ fun SpaceSettingsScreen(
|
|||
else -> null
|
||||
},
|
||||
onNameSet = onNameSet,
|
||||
onRandomGradientClicked = onRandomGradientClicked,
|
||||
onRemoveIconClicked = onRemoveIconClicked,
|
||||
isEditEnabled = when(state) {
|
||||
is ViewState.Error -> false
|
||||
ViewState.Init -> false
|
||||
|
@ -327,7 +327,7 @@ fun SpaceSettingsScreenPreview() {
|
|||
onNetworkIdClicked = {} ,
|
||||
onCreatedByClicked = {},
|
||||
onDebugClicked = {},
|
||||
onRandomGradientClicked = {},
|
||||
onRemoveIconClicked = {},
|
||||
onManageSharedSpaceClicked = {},
|
||||
onSharePrivateSpaceClicked = {},
|
||||
onAddMoreSpacesClicked = {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue