mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Fixing 'Leave group dialog' from inside the group settings
This commit is contained in:
parent
ae64189aa4
commit
4e2cef6346
@ -286,7 +286,7 @@ object ConversationMenuHelper {
|
||||
val accountID = TextSecurePreferences.getLocalNumber(context)
|
||||
val isCurrentUserAdmin = admins.any { it.toString() == accountID }
|
||||
val message = if (isCurrentUserAdmin) {
|
||||
Phrase.from(context, R.string.groupLeaveDescriptionAdmin)
|
||||
Phrase.from(context, R.string.groupDeleteDescription)
|
||||
.put(GROUP_NAME_KEY, group.title)
|
||||
.format()
|
||||
} else {
|
||||
@ -305,7 +305,7 @@ object ConversationMenuHelper {
|
||||
context.showSessionDialog {
|
||||
title(R.string.groupLeave)
|
||||
text(message)
|
||||
button(R.string.yes) {
|
||||
dangerButton(R.string.leave) {
|
||||
try {
|
||||
val groupPublicKey = doubleDecodeGroupID(thread.address.toString()).toHexString()
|
||||
val isClosedGroup = DatabaseComponent.get(context).lokiAPIDatabase().isClosedGroup(groupPublicKey)
|
||||
@ -316,7 +316,7 @@ object ConversationMenuHelper {
|
||||
onLeaveFailed()
|
||||
}
|
||||
}
|
||||
button(R.string.no)
|
||||
button(R.string.cancel)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -595,8 +595,6 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
||||
message = Phrase.from(this.applicationContext, R.string.groupDeleteDescription)
|
||||
.put(GROUP_NAME_KEY, group.title)
|
||||
.format()
|
||||
positiveButtonId = R.string.leave
|
||||
negativeButtonId = R.string.cancel
|
||||
} else {
|
||||
// Otherwise this is either a community, or it's a group you're not an admin of
|
||||
title = if (recipient.isCommunityRecipient) getString(R.string.communityLeave) else getString(R.string.groupLeave)
|
||||
@ -604,6 +602,9 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
||||
.put(GROUP_NAME_KEY, group.title)
|
||||
.format()
|
||||
}
|
||||
|
||||
positiveButtonId = R.string.leave
|
||||
negativeButtonId = R.string.cancel
|
||||
} else {
|
||||
// If this is a 1-on-1 conversation
|
||||
if (recipient.name != null) {
|
||||
|
@ -163,7 +163,6 @@
|
||||
<string name="cameraErrorUnavailable">Camera unavailable.</string>
|
||||
<string name="cameraGrantAccess">Grant Camera Access</string>
|
||||
<string name="cameraGrantAccessDenied">{app_name} needs camera access to take photos and videos, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Camera\".</string>
|
||||
<string name="permissionsCameraDenied">{app_name} needs camera access to take photos and videos, but it has been permanently denied. Tap Settings -> Permissions and turn \"Camera\" on.</string>
|
||||
<string name="cameraGrantAccessDescription">{app_name} needs camera access to take photos and videos, or scan QR codes.</string>
|
||||
<string name="cameraGrantAccessQr">{app_name} needs camera access to scan QR codes</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
@ -313,6 +312,7 @@
|
||||
<string name="disappearingMessagesDeleteType">Delete Type</string>
|
||||
<string name="disappearingMessagesDescription">This setting applies to everyone in this conversation.</string>
|
||||
<string name="disappearingMessagesDescription1">This setting applies to messages you send in this conversation.</string>
|
||||
<string name="disappearingMessagesDescriptionGroup">This setting applies to everyone in this conversation.\nOnly group admins can change this setting.</string>
|
||||
<string name="disappearingMessagesDisappear">Disappear After {disappearing_messages_type} - {time}</string>
|
||||
<string name="disappearingMessagesDisappearAfterRead">Disappear After Read</string>
|
||||
<string name="disappearingMessagesDisappearAfterReadDescription">Messages delete after they have been read.</string>
|
||||
@ -414,7 +414,7 @@
|
||||
<string name="groupInviteYouAndMoreNew"><b>You</b> and <b>{count} others</b> were invited to join the group.</string>
|
||||
<string name="groupInviteYouAndOtherNew"><b>You</b> and <b>{other_name}</b> were invited to join the group.</string>
|
||||
<string name="groupLeave">Leave Group</string>
|
||||
<string name="groupLeaveDescription">Are you sure you want to leave {group_name}?</string>
|
||||
<string name="groupLeaveDescription">Are you sure you want to leave <b>{group_name}</b>?</string>
|
||||
<string name="groupLeaveDescriptionAdmin">Are you sure you want to leave <b>{group_name}</b>?\n\nThis will remove all members and delete all group content.</string>
|
||||
<string name="groupLeaveErrorFailed">Failed to leave {group_name}</string>
|
||||
<string name="groupLegacyBanner">Groups have been upgraded, create a new group to upgrade. Old group functionality will be degraded from {date}.</string>
|
||||
@ -563,7 +563,7 @@
|
||||
<string name="messageRequestYouHaveAccepted">You have accepted the message request from <b>{name}</b>.</string>
|
||||
<string name="messageRequestsAcceptDescription">Sending a message to this user will automatically accept their message request and reveal your Account ID.</string>
|
||||
<string name="messageRequestsAccepted">Your message request has been accepted.</string>
|
||||
<string name="messageRequestsClearAllExplanation">Are you sure you want to clear all message and group invites?</string>
|
||||
<string name="messageRequestsClearAllExplanation">Are you sure you want to clear all message requests and group invites?</string>
|
||||
<string name="messageRequestsCommunities">Community Message Requests</string>
|
||||
<string name="messageRequestsCommunitiesDescription">Allow message requests from Community conversations.</string>
|
||||
<string name="messageRequestsDelete">Are you sure you want to delete this message request?</string>
|
||||
@ -677,20 +677,23 @@
|
||||
<string name="passwordSet">Set Password</string>
|
||||
<string name="passwordSetDescription">Your password has been set. Please keep it safe.</string>
|
||||
<string name="paste">Paste</string>
|
||||
<string name="permissionMusicAudioDenied">{app_name} needs music and audio access in order to send files, music and audio, but it has been permanently denied. Tap Settings -> Permissions, and turn \"Music and audio\" on.</string>
|
||||
<string name="permissionsAppleMusic">{app_name} needs to use Apple Music to play media attachments.</string>
|
||||
<string name="permissionsAutoUpdate">Auto Update</string>
|
||||
<string name="permissionsAutoUpdateDescription">Automatically check for updates on startup.</string>
|
||||
<string name="permissionsCameraDenied">{app_name} needs camera access to take photos and videos, but it has been permanently denied. Tap Settings -> Permissions, and turn \"Camera\" on.</string>
|
||||
<string name="permissionsFaceId">The screen lock feature on {app_name} uses Face ID.</string>
|
||||
<string name="permissionsKeepInSystemTray">Keep in System Tray</string>
|
||||
<string name="permissionsKeepInSystemTrayDescription">{app_name} continues running in the background when you close the window</string>
|
||||
<string name="permissionsLibrary">{app_name} needs photo library access to continue. You can enable access in the iOS settings.</string>
|
||||
<string name="permissionsMicrophone">Microphone</string>
|
||||
<string name="permissionsMicrophoneAccessRequired">{app_name} needs microphone access to send audio messages, but it has been permanently denied. Tap settings -> Permissions, and turn \"Microphone\" on.</string>
|
||||
<string name="permissionsMicrophoneAccessRequired">{app_name} needs microphone access to make calls and send audio messages, but it has been permanently denied. Tap settings -> Permissions, and turn \"Microphone\" on.</string>
|
||||
<string name="permissionsMicrophoneAccessRequiredDesktop">You can enable microphone access in {app_name}\'s privacy settings</string>
|
||||
<string name="permissionsMicrophoneAccessRequiredIos">{app_name} needs microphone access to make calls and record audio messages.</string>
|
||||
<string name="permissionsMicrophoneDescription">Allow access to microphone.</string>
|
||||
<string name="permissionsMusicAudio">{app_name} needs music and audio access in order to send files, music and audio.</string>
|
||||
<string name="permissionsRequired">Permission required</string>
|
||||
<string name="permissionsStorageDenied">{app_name} needs storage access so you can send and save attachments. Tap Settings -> Permissions, and turn \"Files and media\" on.</string>
|
||||
<string name="permissionsStorageDenied">{app_name} needs photo library access so you can send photos and videos, but it has been permanently denied. Tap Settings -> Permissions, and turn \"Photos and videos\" on.</string>
|
||||
<string name="permissionsStorageDeniedLegacy">{app_name} needs storage access so you can send and save attachments. Tap Settings -> Permissions, and turn \"Storage\" on.</string>
|
||||
<string name="permissionsStorageSave">{app_name} needs storage access to save attachments and media.</string>
|
||||
<string name="permissionsStorageSaveDenied">{app_name} needs storage access to save photos and videos, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Storage\".</string>
|
||||
|
Loading…
Reference in New Issue
Block a user