mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Merge pull request #1675 from oxen-io/fix/message-request-after-delete
Fix/message request after delete
This commit is contained in:
commit
75c5a754ff
@ -66,21 +66,21 @@ internal fun StartConversationScreen(
|
|||||||
icon = R.drawable.ic_message,
|
icon = R.drawable.ic_message,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_messageNew),
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_messageNew),
|
||||||
onClick = delegate::onNewMessageSelected)
|
onClick = delegate::onNewMessageSelected)
|
||||||
Divider(startIndent = LocalDimensions.current.dividerIndent)
|
Divider(startIndent = LocalDimensions.current.minItemButtonHeight)
|
||||||
ItemButton(
|
ItemButton(
|
||||||
textId = R.string.groupCreate,
|
textId = R.string.groupCreate,
|
||||||
icon = R.drawable.ic_group,
|
icon = R.drawable.ic_group,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_groupCreate),
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_groupCreate),
|
||||||
onClick = delegate::onCreateGroupSelected
|
onClick = delegate::onCreateGroupSelected
|
||||||
)
|
)
|
||||||
Divider(startIndent = LocalDimensions.current.dividerIndent)
|
Divider(startIndent = LocalDimensions.current.minItemButtonHeight)
|
||||||
ItemButton(
|
ItemButton(
|
||||||
textId = R.string.communityJoin,
|
textId = R.string.communityJoin,
|
||||||
icon = R.drawable.ic_globe,
|
icon = R.drawable.ic_globe,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_communityJoin),
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_communityJoin),
|
||||||
onClick = delegate::onJoinCommunitySelected
|
onClick = delegate::onJoinCommunitySelected
|
||||||
)
|
)
|
||||||
Divider(startIndent = LocalDimensions.current.dividerIndent)
|
Divider(startIndent = LocalDimensions.current.minItemButtonHeight)
|
||||||
ItemButton(
|
ItemButton(
|
||||||
textId = R.string.sessionInviteAFriend,
|
textId = R.string.sessionInviteAFriend,
|
||||||
icon = R.drawable.ic_invite_friend,
|
icon = R.drawable.ic_invite_friend,
|
||||||
|
@ -1583,6 +1583,7 @@ open class Storage(
|
|||||||
if (recipient.isLocalNumber || !recipient.isContactRecipient) return
|
if (recipient.isLocalNumber || !recipient.isContactRecipient) return
|
||||||
configFactory.contacts?.upsertContact(recipient.address.serialize()) {
|
configFactory.contacts?.upsertContact(recipient.address.serialize()) {
|
||||||
this.approved = approved
|
this.approved = approved
|
||||||
|
this.priority = PRIORITY_VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,19 +275,17 @@ fun ItemButton(
|
|||||||
onClick: () -> Unit
|
onClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = modifier.fillMaxWidth()
|
modifier = modifier.fillMaxWidth(),
|
||||||
.height(IntrinsicSize.Min)
|
|
||||||
.heightIn(min = minHeight),
|
|
||||||
colors = colors,
|
colors = colors,
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
contentPadding = PaddingValues(),
|
contentPadding = PaddingValues(),
|
||||||
shape = RectangleShape,
|
shape = RectangleShape,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxHeight()
|
modifier = Modifier
|
||||||
.align(Alignment.CenterVertically)
|
|
||||||
.padding(horizontal = LocalDimensions.current.xxsSpacing)
|
.padding(horizontal = LocalDimensions.current.xxsSpacing)
|
||||||
.aspectRatio(1f),
|
.size(minHeight)
|
||||||
|
.align(Alignment.CenterVertically),
|
||||||
content = icon
|
content = icon
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -313,6 +311,18 @@ fun PreviewItemButton() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Preview
|
||||||
|
@Composable
|
||||||
|
fun PreviewLargeItemButton() {
|
||||||
|
PreviewTheme {
|
||||||
|
LargeItemButton(
|
||||||
|
textId = R.string.groupCreate,
|
||||||
|
icon = R.drawable.ic_group,
|
||||||
|
onClick = {}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Cell(
|
fun Cell(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
@ -15,7 +15,6 @@ data class Dimensions(
|
|||||||
val mediumSpacing: Dp = 36.dp,
|
val mediumSpacing: Dp = 36.dp,
|
||||||
val xlargeSpacing: Dp = 64.dp,
|
val xlargeSpacing: Dp = 64.dp,
|
||||||
|
|
||||||
val dividerIndent: Dp = 60.dp,
|
|
||||||
val appBarHeight: Dp = 64.dp,
|
val appBarHeight: Dp = 64.dp,
|
||||||
val minItemButtonHeight: Dp = 50.dp,
|
val minItemButtonHeight: Dp = 50.dp,
|
||||||
val minLargeItemButtonHeight: Dp = 60.dp,
|
val minLargeItemButtonHeight: Dp = 60.dp,
|
||||||
|
Loading…
Reference in New Issue
Block a user