1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-1941 Templates | Fix | Remove plus button from drop down menu (#596)

This commit is contained in:
Konstantin Ivanov 2023-11-23 18:27:09 +01:00 committed by GitHub
parent 0e35abf019
commit d8e619dfbc
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,31 +251,6 @@ fun TypeTemplatesWidget(
color = colorResource(R.color.text_primary)
)
}
Box(
modifier = Modifier
.align(Alignment.CenterEnd)
.noRippleThrottledClickable {
val templates =
(currentState as? TypeTemplatesWidgetUI.Data)?.templates
val newTemplate =
templates?.firstOrNull { it is TemplateView.New }
if (newTemplate != null) {
action(TemplateClick(newTemplate))
}
}
.alpha(if (currentState.isPossibleToChangeTemplate) 1f else 0f)
) {
Image(
modifier = Modifier.padding(
start = 16.dp,
top = 12.dp,
bottom = 12.dp,
end = 16.dp
),
painter = painterResource(id = R.drawable.ic_default_plus),
contentDescription = null
)
}
}
val itemsScroll = rememberLazyListState()
if ((currentState as? TypeTemplatesWidgetUI.Data)?.isPossibleToChangeType == true) {