mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-14 19:05:27 +00:00
changes matching ios
This commit is contained in:
+14
-7
@@ -92,6 +92,9 @@ fun ChatInfoView(
|
||||
},
|
||||
chatItemTTL = chatItemTTL,
|
||||
setChatItemTTL = {
|
||||
if (it == chatItemTTL.value) {
|
||||
return@ChatInfoLayout
|
||||
}
|
||||
val previousChatTTL = chatItemTTL.value
|
||||
chatItemTTL.value = it
|
||||
|
||||
@@ -604,13 +607,6 @@ fun ChatInfoLayout(
|
||||
// } else if (developerTools) {
|
||||
// SynchronizeConnectionButtonForce(syncContactConnectionForce)
|
||||
// }
|
||||
TtlOptions(
|
||||
chatItemTTL,
|
||||
enabled = remember { mutableStateOf(true) },
|
||||
onSelected = setChatItemTTL,
|
||||
default = chatModel.chatItemTTL,
|
||||
icon = painterResource(MR.images.ic_delete),
|
||||
)
|
||||
}
|
||||
|
||||
WallpaperButton {
|
||||
@@ -625,6 +621,17 @@ fun ChatInfoLayout(
|
||||
}
|
||||
SectionDividerSpaced(maxBottomPadding = false)
|
||||
|
||||
SectionView {
|
||||
TtlOptions(
|
||||
chatItemTTL,
|
||||
enabled = remember { mutableStateOf(true) },
|
||||
onSelected = setChatItemTTL,
|
||||
default = chatModel.chatItemTTL
|
||||
)
|
||||
}
|
||||
SectionTextFooter(stringResource(MR.strings.chat_ttl_options_footer))
|
||||
SectionDividerSpaced(maxTopPadding = true, maxBottomPadding = false)
|
||||
|
||||
val conn = contact.activeConn
|
||||
if (conn != null) {
|
||||
SectionView {
|
||||
|
||||
+15
-9
@@ -73,6 +73,9 @@ fun ModalData.GroupChatInfoView(chatModel: ChatModel, rhId: Long?, chatId: Strin
|
||||
},
|
||||
chatItemTTL = chatItemTTL,
|
||||
setChatItemTTL = {
|
||||
if (it == chatItemTTL.value) {
|
||||
return@GroupChatInfoLayout
|
||||
}
|
||||
val previousChatTTL = chatItemTTL.value
|
||||
chatItemTTL.value = it
|
||||
|
||||
@@ -402,14 +405,6 @@ fun ModalData.GroupChatInfoLayout(
|
||||
SendReceiptsOptionDisabled()
|
||||
}
|
||||
|
||||
TtlOptions(
|
||||
chatItemTTL,
|
||||
enabled = remember { mutableStateOf(true) },
|
||||
onSelected = setChatItemTTL,
|
||||
default = chatModel.chatItemTTL,
|
||||
icon = painterResource(MR.images.ic_delete),
|
||||
)
|
||||
|
||||
WallpaperButton {
|
||||
ModalManager.end.showModal {
|
||||
val chat = remember { derivedStateOf { chatModel.chats.value.firstOrNull { it.id == chat.id } } }
|
||||
@@ -422,7 +417,18 @@ fun ModalData.GroupChatInfoLayout(
|
||||
}
|
||||
val footerId = if (groupInfo.businessChat == null) MR.strings.only_group_owners_can_change_prefs else MR.strings.only_chat_owners_can_change_prefs
|
||||
SectionTextFooter(stringResource(footerId))
|
||||
SectionDividerSpaced(maxTopPadding = true)
|
||||
SectionDividerSpaced(maxTopPadding = true, maxBottomPadding = false)
|
||||
|
||||
SectionView {
|
||||
TtlOptions(
|
||||
chatItemTTL,
|
||||
enabled = remember { mutableStateOf(true) },
|
||||
onSelected = setChatItemTTL,
|
||||
default = chatModel.chatItemTTL
|
||||
)
|
||||
}
|
||||
SectionTextFooter(stringResource(MR.strings.chat_ttl_options_footer))
|
||||
SectionDividerSpaced(maxTopPadding = true, maxBottomPadding = false)
|
||||
|
||||
SectionView(title = String.format(generalGetString(MR.strings.group_info_section_title_num_members), members.count() + 1)) {
|
||||
if (groupInfo.canAddMembers) {
|
||||
|
||||
+2
-3
@@ -308,8 +308,7 @@ fun TtlOptions(
|
||||
current: State<ChatItemTTL?>,
|
||||
enabled: State<Boolean>,
|
||||
onSelected: (ChatItemTTL?) -> Unit,
|
||||
default: State<ChatItemTTL>? = null,
|
||||
icon: Painter? = null
|
||||
default: State<ChatItemTTL>? = null
|
||||
) {
|
||||
val values = remember {
|
||||
val all: ArrayList<ChatItemTTL> = arrayListOf(ChatItemTTL.None, ChatItemTTL.Year, ChatItemTTL.Month, ChatItemTTL.Week, ChatItemTTL.Day)
|
||||
@@ -331,7 +330,7 @@ fun TtlOptions(
|
||||
generalGetString(MR.strings.delete_messages_after),
|
||||
values,
|
||||
current,
|
||||
icon = icon,
|
||||
icon = null,
|
||||
enabled = enabled,
|
||||
onSelected = onSelected
|
||||
)
|
||||
|
||||
@@ -542,9 +542,10 @@
|
||||
<string name="notifications">Notifications</string>
|
||||
<string name="disable_automatic_deletion_question">Disable automatic message deletion?</string>
|
||||
<string name="change_automatic_deletion_question">Change automatic message deletion?</string>
|
||||
<string name="disable_automatic_deletion_message">Messages on this chat will never be deleted.</string>
|
||||
<string name="change_automatic_chat_deletion_message">This action cannot be undone - the messages sent and received on this chat earlier than selected will be deleted. It may take several minutes.</string>
|
||||
<string name="disable_automatic_deletion_message">Messages in this chat will never be deleted.</string>
|
||||
<string name="change_automatic_chat_deletion_message">This action cannot be undone - the messages sent and received in this chat earlier than selected will be deleted.</string>
|
||||
<string name="disable_automatic_deletion">Disable delete messages</string>
|
||||
<string name="chat_ttl_options_footer">Delete chat messages from your device.</string>
|
||||
|
||||
<!-- Chat Info Actions - ChatInfoView.kt -->
|
||||
<string name="info_view_connect_button">connect</string>
|
||||
|
||||
Reference in New Issue
Block a user