From 59eed8835bb36b4366562abcb784f8273a2afcbb Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 11 Sep 2024 16:34:06 +1000 Subject: [PATCH 01/17] Updating the app to using Compose 1.7.1 via the latest BOM --- app/build.gradle | 24 +++++++++++++++--------- gradle.properties | 1 - 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5944f8c9a1..639f6b331c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -354,15 +354,21 @@ dependencies { testImplementation 'org.conscrypt:conscrypt-openjdk-uber:2.5.2' // For Robolectric testImplementation 'app.cash.turbine:turbine:1.1.0' - implementation 'com.github.bumptech.glide:compose:1.0.0-alpha.5' - implementation "androidx.compose.ui:ui:$composeVersion" - implementation "androidx.compose.animation:animation:$composeVersion" - implementation "androidx.compose.ui:ui-tooling:$composeVersion" - implementation "androidx.compose.runtime:runtime-livedata:$composeVersion" - implementation "androidx.compose.foundation:foundation-layout:$composeVersion" - implementation "androidx.compose.material3:material3:1.2.1" - androidTestImplementation "androidx.compose.ui:ui-test-junit4-android:$composeVersion" - debugImplementation "androidx.compose.ui:ui-test-manifest:$composeVersion" + // compose + Dependency composeBom = platform('androidx.compose:compose-bom:2024.09.01') + implementation composeBom + testImplementation composeBom + androidTestImplementation composeBom + + implementation "androidx.compose.ui:ui" + implementation "androidx.compose.animation:animation" + implementation "androidx.compose.ui:ui-tooling" + implementation "androidx.compose.runtime:runtime-livedata" + implementation "androidx.compose.foundation:foundation-layout" + implementation "androidx.compose.material3:material3:1.3.0" + + androidTestImplementation "androidx.compose.ui:ui-test-junit4-android" + debugImplementation "androidx.compose.ui:ui-test-manifest" implementation "com.google.accompanist:accompanist-themeadapter-appcompat:0.33.1-alpha" implementation "com.google.accompanist:accompanist-permissions:0.36.0" diff --git a/gradle.properties b/gradle.properties index 91d8222de7..77f81be2b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,6 @@ kotlinVersion=1.9.24 android.useAndroidX=true appcompatVersion=1.6.1 coreVersion=1.13.1 -composeVersion=1.6.4 coroutinesVersion=1.6.4 curve25519Version=0.6.0 jetpackHiltVersion=1.2.0 From d897a83cd5cfcef74dd136d76a087d06c828ab07 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 11 Sep 2024 16:57:09 +1000 Subject: [PATCH 02/17] Tweaking debug menu --- .../securesms/debugmenu/DebugMenu.kt | 6 ++- .../{Html.kt => AnnotatedString.kt} | 46 +++++-------------- 2 files changed, 16 insertions(+), 36 deletions(-) rename app/src/main/java/org/thoughtcrime/securesms/ui/components/{Html.kt => AnnotatedString.kt} (81%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt b/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt index f277d1f40b..38a01a9db4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt @@ -149,9 +149,11 @@ fun ColumnScope.DebugCell( ) { Spacer(modifier = Modifier.height(LocalDimensions.current.smallSpacing)) - Cell { + Cell( + modifier = modifier + ) { Column( - modifier = modifier.padding(LocalDimensions.current.spacing) + modifier = Modifier.padding(LocalDimensions.current.spacing) ) { Text( text = title, diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Html.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/AnnotatedString.kt similarity index 81% rename from app/src/main/java/org/thoughtcrime/securesms/ui/components/Html.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/components/AnnotatedString.kt index 15f0292853..68587bc9e1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Html.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/AnnotatedString.kt @@ -3,8 +3,16 @@ package org.thoughtcrime.securesms.ui.components import android.content.res.Resources import android.graphics.Typeface import android.text.Spanned -import android.text.SpannedString -import android.text.style.* +import android.text.style.AbsoluteSizeSpan +import android.text.style.BulletSpan +import android.text.style.ForegroundColorSpan +import android.text.style.RelativeSizeSpan +import android.text.style.StrikethroughSpan +import android.text.style.StyleSpan +import android.text.style.SubscriptSpan +import android.text.style.SuperscriptSpan +import android.text.style.TypefaceSpan +import android.text.style.UnderlineSpan import android.util.Log import androidx.annotation.StringRes import androidx.compose.runtime.Composable @@ -14,7 +22,6 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString @@ -26,13 +33,9 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.em -import androidx.core.text.HtmlCompat -import com.squareup.phrase.Phrase -import network.loki.messenger.R -import org.session.libsession.utilities.StringSubstitutionConstants.URL_KEY -// TODO Remove this file once we update to composeVersion=1.7.0-alpha06 fixes https://issuetracker.google.com/issues/139320238?pli=1 -// which allows Stylized string in string resources +// Utilities for AnnotatedStrings, +// like converting the old view system's SpannableString to AnnotatedString @Composable @ReadOnlyComposable private fun resources(): Resources { @@ -40,31 +43,6 @@ private fun resources(): Resources { return LocalContext.current.resources } -fun Spanned.toHtmlWithoutParagraphs(): String { - return HtmlCompat.toHtml(this, HtmlCompat.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE) - .substringAfter("

").substringBeforeLast("

") -} - -fun Resources.getText(@StringRes id: Int, vararg args: Any): CharSequence { - val escapedArgs = args.map { - if (it is Spanned) it.toHtmlWithoutParagraphs() else it - }.toTypedArray() - val resource = SpannedString(getText(id)) - val htmlResource = resource.toHtmlWithoutParagraphs() - val formattedHtml = String.format(htmlResource, *escapedArgs) - return HtmlCompat.fromHtml(formattedHtml, HtmlCompat.FROM_HTML_MODE_LEGACY) -} - -@Composable -fun annotatedStringResource(@StringRes id: Int, vararg formatArgs: Any): AnnotatedString { - val resources = resources() - val density = LocalDensity.current - return remember(id, formatArgs) { - val text = resources.getText(id, *formatArgs) - spannableStringToAnnotatedString(text, density) - } -} - @Composable fun annotatedStringResource(@StringRes id: Int): AnnotatedString { val resources = resources() From 607dae24503986f1ae905fd02a5dc9a4b4bc7a11 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 11 Sep 2024 17:10:48 +1000 Subject: [PATCH 03/17] Removing hardcoded reference to material3 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 639f6b331c..bf19aa5c44 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -365,7 +365,7 @@ dependencies { implementation "androidx.compose.ui:ui-tooling" implementation "androidx.compose.runtime:runtime-livedata" implementation "androidx.compose.foundation:foundation-layout" - implementation "androidx.compose.material3:material3:1.3.0" + implementation "androidx.compose.material3:material3" androidTestImplementation "androidx.compose.ui:ui-test-junit4-android" debugImplementation "androidx.compose.ui:ui-test-manifest" From f0c8ec81e526cba8db62577210043f24eba7ee7b Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Thu, 12 Sep 2024 09:15:36 +1000 Subject: [PATCH 04/17] Using the latest compose compiler --- app/build.gradle | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bf19aa5c44..deb0f6f495 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -68,7 +68,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion '1.5.14' + kotlinCompilerExtensionVersion '1.5.15' } defaultConfig { diff --git a/gradle.properties b/gradle.properties index 77f81be2b7..4c9b7bec3c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" gradlePluginVersion=8.5.2 googleServicesVersion=4.3.12 -kotlinVersion=1.9.24 +kotlinVersion=1.9.25 android.useAndroidX=true appcompatVersion=1.6.1 coreVersion=1.13.1 From 73b0088aea30bb881377a423f51035708a624bbf Mon Sep 17 00:00:00 2001 From: bemusementpark Date: Wed, 18 Sep 2024 16:34:44 +0930 Subject: [PATCH 05/17] Fix ItemButton padding for downstate --- .../org/thoughtcrime/securesms/ui/Components.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt index 355d74947d..6f6992474f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt @@ -277,21 +277,19 @@ fun ItemButton( TextButton( modifier = modifier.fillMaxWidth() .height(IntrinsicSize.Min) - .heightIn(min = minHeight) - .padding(horizontal = LocalDimensions.current.xsSpacing), + .heightIn(min = minHeight), colors = colors, onClick = onClick, + contentPadding = PaddingValues(), shape = RectangleShape, ) { Box( modifier = Modifier.fillMaxHeight() - .aspectRatio(1f) .align(Alignment.CenterVertically) - ) { - icon() - } - - Spacer(modifier = Modifier.width(LocalDimensions.current.smallSpacing)) + .padding(horizontal = LocalDimensions.current.xxsSpacing) + .aspectRatio(1f), + content = icon + ) Text( text, From 1ff8ea0fc8f23e03c54c3d8df4f2ac661b750062 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 20 Sep 2024 09:54:08 +1000 Subject: [PATCH 06/17] SES-1714 - SES-1715 Making sure an approved message request sets the contact as visible. They could have been set to hidden if the contact had previously sent another message request which was then declined. Upon sending another one we need to make sure the contact is set to visible once that request is approved. --- app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index 8fdbe2accc..d7ad48b497 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -1583,6 +1583,7 @@ open class Storage( if (recipient.isLocalNumber || !recipient.isContactRecipient) return configFactory.contacts?.upsertContact(recipient.address.serialize()) { this.approved = approved + this.priority = PRIORITY_VISIBLE } } From 3dfbd0892d463d8657a2df2253ca1c2c14bac937 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 20 Sep 2024 10:29:11 +1000 Subject: [PATCH 07/17] Cleaned up ItemButton to work in both its variations --- .../start/home/StartConversation.kt | 6 ++--- .../thoughtcrime/securesms/ui/Components.kt | 22 ++++++++++++++----- .../securesms/ui/theme/Dimensions.kt | 1 - 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt index f00fbf44a9..f65dce4974 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt @@ -66,21 +66,21 @@ internal fun StartConversationScreen( icon = R.drawable.ic_message, modifier = Modifier.contentDescription(R.string.AccessibilityId_messageNew), onClick = delegate::onNewMessageSelected) - Divider(startIndent = LocalDimensions.current.dividerIndent) + Divider(startIndent = LocalDimensions.current.minItemButtonHeight) ItemButton( textId = R.string.groupCreate, icon = R.drawable.ic_group, modifier = Modifier.contentDescription(R.string.AccessibilityId_groupCreate), onClick = delegate::onCreateGroupSelected ) - Divider(startIndent = LocalDimensions.current.dividerIndent) + Divider(startIndent = LocalDimensions.current.minItemButtonHeight) ItemButton( textId = R.string.communityJoin, icon = R.drawable.ic_globe, modifier = Modifier.contentDescription(R.string.AccessibilityId_communityJoin), onClick = delegate::onJoinCommunitySelected ) - Divider(startIndent = LocalDimensions.current.dividerIndent) + Divider(startIndent = LocalDimensions.current.minItemButtonHeight) ItemButton( textId = R.string.sessionInviteAFriend, icon = R.drawable.ic_invite_friend, diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt index 6f6992474f..1a8a917f40 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt @@ -275,19 +275,17 @@ fun ItemButton( onClick: () -> Unit ) { TextButton( - modifier = modifier.fillMaxWidth() - .height(IntrinsicSize.Min) - .heightIn(min = minHeight), + modifier = modifier.fillMaxWidth(), colors = colors, onClick = onClick, contentPadding = PaddingValues(), shape = RectangleShape, ) { Box( - modifier = Modifier.fillMaxHeight() - .align(Alignment.CenterVertically) + modifier = Modifier .padding(horizontal = LocalDimensions.current.xxsSpacing) - .aspectRatio(1f), + .size(minHeight) + .align(Alignment.CenterVertically), 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 fun Cell( modifier: Modifier = Modifier, diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt index ac5ce8c4cf..d1608ea24e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt @@ -15,7 +15,6 @@ data class Dimensions( val mediumSpacing: Dp = 36.dp, val xlargeSpacing: Dp = 64.dp, - val dividerIndent: Dp = 60.dp, val appBarHeight: Dp = 64.dp, val minItemButtonHeight: Dp = 50.dp, val minLargeItemButtonHeight: Dp = 60.dp, From c956b2050c551ab12cb9d1ae5f7160a9f1392082 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Mon, 30 Sep 2024 13:32:08 +1000 Subject: [PATCH 08/17] Making sure we don't pass in a null recipient name --- app/build.gradle | 4 ++-- .../securesms/conversation/v2/ConversationActivityV2.kt | 8 ++++---- .../securesms/conversation/v2/dialogs/DownloadDialog.kt | 2 +- .../java/org/thoughtcrime/securesms/home/HomeActivity.kt | 9 +++++---- .../securesms/messagerequests/MessageRequestsActivity.kt | 2 +- .../libsession/utilities/recipients/Recipient.java | 2 ++ 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1d72dfb0fd..32b75caf37 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ configurations.forEach { it.exclude module: "commons-logging" } -def canonicalVersionCode = 382 -def canonicalVersionName = "1.20.0" +def canonicalVersionCode = 383 +def canonicalVersionName = "1.20.1" def postFixSize = 10 def abiPostFix = ['armeabi-v7a' : 1, diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index a1eca65eb4..7b05e18594 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -813,7 +813,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe if (shouldShowLegacy) { val txt = Phrase.from(applicationContext, R.string.disappearingMessagesLegacy) - .put(NAME_KEY, legacyRecipient!!.name) + .put(NAME_KEY, legacyRecipient!!.toShortString()) .format() binding?.outdatedBannerTextView?.text = txt } @@ -1191,14 +1191,14 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe title(R.string.block) text( Phrase.from(context, R.string.blockDescription) - .put(NAME_KEY, recipient.name) + .put(NAME_KEY, recipient.toShortString()) .format() ) dangerButton(R.string.block, R.string.AccessibilityId_blockConfirm) { viewModel.block() // Block confirmation toast added as per SS-64 - val txt = Phrase.from(context, R.string.blockBlockedUser).put(NAME_KEY, recipient.name).format().toString() + val txt = Phrase.from(context, R.string.blockBlockedUser).put(NAME_KEY, recipient.toShortString()).format().toString() Toast.makeText(context, txt, Toast.LENGTH_LONG).show() if (deleteThread) { @@ -1249,7 +1249,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe title(R.string.blockUnblock) text( Phrase.from(context, R.string.blockUnblockName) - .put(NAME_KEY, recipient.name) + .put(NAME_KEY, recipient.toShortString()) .format() ) dangerButton(R.string.blockUnblock, R.string.AccessibilityId_unblockConfirm) { viewModel.unblock() } diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt index d3e1de9912..a1127865e9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt @@ -35,7 +35,7 @@ class DownloadDialog(private val recipient: Recipient) : DialogFragment() { title(getString(R.string.attachmentsAutoDownloadModalTitle)) val explanation = Phrase.from(context, R.string.attachmentsAutoDownloadModalDescription) - .put(CONVERSATION_NAME_KEY, recipient.name) + .put(CONVERSATION_NAME_KEY, recipient.displayName) .format() val spannable = SpannableStringBuilder(explanation) diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt index aeaa7338f2..2bb3d63cc0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt @@ -71,6 +71,7 @@ import org.thoughtcrime.securesms.home.search.GlobalSearchViewModel import org.thoughtcrime.securesms.messagerequests.MessageRequestsActivity import com.bumptech.glide.Glide import com.bumptech.glide.RequestManager +import org.session.libsession.utilities.truncateIdForDisplay import org.thoughtcrime.securesms.notifications.PushRegistry import org.thoughtcrime.securesms.permissions.Permissions import org.thoughtcrime.securesms.preferences.SettingsActivity @@ -507,7 +508,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), showSessionDialog { title(R.string.block) text(Phrase.from(context, R.string.blockDescription) - .put(NAME_KEY, thread.recipient.name) + .put(NAME_KEY, thread.recipient.toShortString()) .format()) dangerButton(R.string.block, R.string.AccessibilityId_blockConfirm) { lifecycleScope.launch(Dispatchers.IO) { @@ -518,7 +519,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), } } // Block confirmation toast added as per SS-64 - val txt = Phrase.from(context, R.string.blockBlockedUser).put(NAME_KEY, thread.recipient.name).format().toString() + val txt = Phrase.from(context, R.string.blockBlockedUser).put(NAME_KEY, thread.recipient.toShortString()).format().toString() Toast.makeText(context, txt, Toast.LENGTH_LONG).show() } cancelButton() @@ -528,7 +529,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), private fun unblockConversation(thread: ThreadRecord) { showSessionDialog { title(R.string.blockUnblock) - text(Phrase.from(context, R.string.blockUnblockName).put(NAME_KEY, thread.recipient.name).format()) + text(Phrase.from(context, R.string.blockUnblockName).put(NAME_KEY, thread.recipient.toShortString()).format()) dangerButton(R.string.blockUnblock, R.string.AccessibilityId_unblockConfirm) { lifecycleScope.launch(Dispatchers.IO) { storage.setBlocked(listOf(thread.recipient), false) @@ -616,7 +617,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), if (recipient.name != null) { title = getString(R.string.conversationsDelete) message = Phrase.from(this.applicationContext, R.string.conversationsDeleteDescription) - .put(NAME_KEY, recipient.name) + .put(NAME_KEY, recipient.toShortString()) .format() } else { diff --git a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt index 4d280a47ad..e27345afc7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsActivity.kt @@ -87,7 +87,7 @@ class MessageRequestsActivity : PassphraseRequiredActionBarActivity(), Conversat showSessionDialog { title(R.string.block) text(Phrase.from(context, R.string.blockDescription) - .put(NAME_KEY, thread.recipient.name) + .put(NAME_KEY, thread.recipient.toShortString()) .format()) dangerButton(R.string.block, R.string.AccessibilityId_blockConfirm) { doBlock() diff --git a/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java b/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java index ac0c9067c4..8499ddf398 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java +++ b/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java @@ -17,6 +17,8 @@ */ package org.session.libsession.utilities.recipients; +import static org.session.libsession.utilities.IdUtilKt.truncateIdForDisplay; + import android.content.Context; import android.graphics.drawable.Drawable; import android.net.Uri; From 29c6e6b081fea8f645dcec7529f415b6aaa8b5ba Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Tue, 1 Oct 2024 15:36:49 +1000 Subject: [PATCH 09/17] Adding back long press fix --- .../securesms/conversation/v2/ConversationActivityV2.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 7b05e18594..14c921e923 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -38,7 +38,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.ui.platform.ViewCompositionStrategy import androidx.core.content.ContextCompat -import androidx.core.view.drawToBitmap import androidx.core.view.isGone import androidx.core.view.isVisible import androidx.fragment.app.DialogFragment @@ -181,6 +180,7 @@ import org.thoughtcrime.securesms.util.DateUtils import org.thoughtcrime.securesms.util.MediaUtil import org.thoughtcrime.securesms.util.NetworkUtils import org.thoughtcrime.securesms.util.SaveAttachmentTask +import org.thoughtcrime.securesms.util.drawToBitmap import org.thoughtcrime.securesms.util.isScrolledToBottom import org.thoughtcrime.securesms.util.isScrolledToWithin30dpOfBottom import org.thoughtcrime.securesms.util.push From 3d42a04823a43687f86bf3bbb2a64537ad62d318 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 2 Oct 2024 10:16:10 +1000 Subject: [PATCH 10/17] Fixing property name --- .../securesms/conversation/v2/dialogs/DownloadDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt index a1127865e9..f9e45547d1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/dialogs/DownloadDialog.kt @@ -35,7 +35,7 @@ class DownloadDialog(private val recipient: Recipient) : DialogFragment() { title(getString(R.string.attachmentsAutoDownloadModalTitle)) val explanation = Phrase.from(context, R.string.attachmentsAutoDownloadModalDescription) - .put(CONVERSATION_NAME_KEY, recipient.displayName) + .put(CONVERSATION_NAME_KEY, recipient.toShortString()) .format() val spannable = SpannableStringBuilder(explanation) From b237faa21d49f9c5fbfa29511fc2b2375e165242 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 4 Oct 2024 12:19:39 +1000 Subject: [PATCH 11/17] Fixing ANRs --- .../conversation/v2/ConversationActivityV2.kt | 18 ++++++++++++++---- .../home/search/GlobalSearchViewModel.kt | 14 +++++++++++--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 14c921e923..4e0c1329f3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -58,6 +58,7 @@ import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.channels.Channel +import kotlinx.coroutines.delay import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.launch @@ -1737,10 +1738,19 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe binding.inputBar.text = "" binding.inputBar.cancelQuoteDraft() binding.inputBar.cancelLinkPreviewDraft() - // Put the message in the database - message.id = smsDb.insertMessageOutbox(viewModel.threadId, outgoingTextMessage, false, message.sentTimestamp!!, null, true) - // Send it - MessageSender.send(message, recipient.address) + lifecycleScope.launch(Dispatchers.Default) { + // Put the message in the database + message.id = smsDb.insertMessageOutbox( + viewModel.threadId, + outgoingTextMessage, + false, + message.sentTimestamp!!, + null, + true + ) + // Send it + MessageSender.send(message, recipient.address) + } // Send a typing stopped message ApplicationContext.getInstance(this).typingStatusSender.onTypingStopped(viewModel.threadId) return Pair(recipient.address, sentTimestamp) diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt index 4a25556a42..3e99134506 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.home.search import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.channels.BufferOverflow @@ -13,11 +14,13 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.buffer import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.merge import kotlinx.coroutines.launch import kotlinx.coroutines.plus +import kotlinx.coroutines.withContext import org.thoughtcrime.securesms.search.SearchRepository import org.thoughtcrime.securesms.search.model.SearchResult import javax.inject.Inject @@ -38,9 +41,14 @@ class GlobalSearchViewModel @Inject constructor( .buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST) .mapLatest { query -> if (query.trim().isEmpty()) { - // searching for 05 as contactDb#getAllContacts was not returning contacts - // without a nickname/name who haven't approved us. - GlobalSearchResult(query.toString(), searchRepository.queryContacts("05").first.toList()) + withContext(Dispatchers.Default) { + // searching for 05 as contactDb#getAllContacts was not returning contacts + // without a nickname/name who haven't approved us. + GlobalSearchResult( + query.toString(), + searchRepository.queryContacts("05").first.toList() + ) + } } else { // User input delay in case we get a new query within a few hundred ms this // coroutine will be cancelled and the expensive query will not be run. From 8fec296c11c317dfff06e243404aa0a8de846f4b Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 4 Oct 2024 12:50:49 +1000 Subject: [PATCH 12/17] Fixing Crashes --- .../conversation/v2/ConversationActivityV2.kt | 5 +++-- .../securesms/database/model/ThreadRecord.java | 17 ++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 4e0c1329f3..9bbbc787ef 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -735,9 +735,10 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe private fun restoreDraftIfNeeded() { val mediaURI = intent.data val mediaType = AttachmentManager.MediaType.from(intent.type) + val mimeType = MediaUtil.getMimeType(this, mediaURI) if (mediaURI != null && mediaType != null) { - if (AttachmentManager.MediaType.IMAGE == mediaType || AttachmentManager.MediaType.GIF == mediaType || AttachmentManager.MediaType.VIDEO == mediaType) { - val media = Media(mediaURI, MediaUtil.getMimeType(this, mediaURI)!!, 0, 0, 0, 0, Optional.absent(), Optional.absent()) + if (mimeType != null && (AttachmentManager.MediaType.IMAGE == mediaType || AttachmentManager.MediaType.GIF == mediaType || AttachmentManager.MediaType.VIDEO == mediaType)) { + val media = Media(mediaURI, mimeType, 0, 0, 0, 0, Optional.absent(), Optional.absent()) startActivityForResult(MediaSendActivity.buildEditorIntent(this, listOf( media ), viewModel.recipient!!, ""), PICK_FROM_LIBRARY) return } else { diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java b/app/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java index d91f4c428c..c022598d2c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java @@ -144,14 +144,17 @@ public class ThreadRecord extends DisplayRecord { .format().toString(); } else if (MmsSmsColumns.Types.isMessageRequestResponse(type)) { - if (lastMessage.getRecipient().getAddress().serialize().equals( - TextSecurePreferences.getLocalNumber(context))) { - return UtilKt.getSubbedCharSequence( - context, - R.string.messageRequestYouHaveAccepted, - new Pair<>(NAME_KEY, getName()) - ); + try { + if (lastMessage.getRecipient().getAddress().serialize().equals( + TextSecurePreferences.getLocalNumber(context))) { + return UtilKt.getSubbedCharSequence( + context, + R.string.messageRequestYouHaveAccepted, + new Pair<>(NAME_KEY, getName()) + ); + } } + catch (Exception e){} // the above can throw a null exception return context.getString(R.string.messageRequestsAccepted); } else if (getCount() == 0) { From 390757fe5019879c3d81fbd4dc8c9aeda7b490e9 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 4 Oct 2024 13:18:45 +1000 Subject: [PATCH 13/17] Updating QA tags for dialogs as per the QA Team's instructions --- .../securesms/SessionDialogBuilder.kt | 17 +++++++++++++---- .../securesms/debugmenu/DebugMenu.kt | 2 -- .../securesms/media/MediaOverviewScreen.kt | 4 ++-- .../securesms/onboarding/landing/Landing.kt | 2 -- .../securesms/preferences/SettingsActivity.kt | 2 -- .../thoughtcrime/securesms/ui/AlertDialog.kt | 12 +++++------- .../src/main/res/values/strings.xml | 3 +++ 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt b/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt index 69d58411f3..3e9fb7bcfb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt @@ -62,7 +62,10 @@ class SessionDialogBuilder(val context: Context) { // Main title entry point fun title(text: String?) { - text(text, R.style.TextAppearance_Session_Dialog_Title) { setPadding(dp20, 0, dp20, 0) } + text( + text = text, + qaTag = context.getString(R.string.AccessibilityId_modalTitle), + style = R.style.TextAppearance_Session_Dialog_Title) { setPadding(dp20, 0, dp20, 0) } } // Convenience assessor for title that takes a string resource @@ -74,18 +77,24 @@ class SessionDialogBuilder(val context: Context) { fun text(@StringRes id: Int, style: Int? = null) = text(context.getString(id), style) fun text(text: CharSequence?, @StyleRes style: Int? = null) { - text(text, style) { + text(text = text, style = style) { layoutParams = LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT) .apply { updateMargins(dp40, 0, dp40, 0) } } } - private fun text(text: CharSequence?, @StyleRes style: Int? = null, modify: TextView.() -> Unit) { + private fun text( + text: CharSequence?, + qaTag: String = context.getString(R.string.AccessibilityId_modalMessage), + @StyleRes style: Int? = null, + modify: TextView.() -> Unit + ) { text ?: return TextView(context, null, 0, style ?: R.style.TextAppearance_Session_Dialog_Message) .apply { setText(text) textAlignment = View.TEXT_ALIGNMENT_CENTER + contentDescription = qaTag modify() }.let(topView::addView) @@ -166,7 +175,7 @@ class SessionDialogBuilder(val context: Context) { textColor?.let{ setTextColor(it) } - contentDescription = resources.getString(contentDescriptionRes) + contentDescription = resources.getString(text) // QA now wants the qa tag to mtch the button's text layoutParams = LinearLayout.LayoutParams(WRAP_CONTENT, dp60, 1f) setOnClickListener { listener.invoke() diff --git a/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt b/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt index 38a01a9db4..3ae656fa60 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/debugmenu/DebugMenu.kt @@ -74,12 +74,10 @@ fun DebugMenu( buttons = listOf( DialogButtonModel( text = GetString(R.string.cancel), - contentDescription = GetString(R.string.cancel), onClick = { sendCommand(HideEnvironmentWarningDialog) } ), DialogButtonModel( text = GetString(R.string.ok), - contentDescription = GetString(R.string.ok), onClick = { sendCommand(ChangeEnvironment) } ) ) diff --git a/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewScreen.kt index 34ccc1c1c6..c6c6ca2e41 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/media/MediaOverviewScreen.kt @@ -231,8 +231,8 @@ private fun SaveAttachmentWarningDialog( title = context.getString(R.string.warning), text = context.resources.getString(R.string.attachmentsWarning), buttons = listOf( - DialogButtonModel(GetString(R.string.save), GetString(R.string.AccessibilityId_saveAttachment), color = LocalColors.current.danger, onClick = onAccepted), - DialogButtonModel(GetString(android.R.string.cancel), GetString(R.string.AccessibilityId_cancel), dismissOnClick = true) + DialogButtonModel(GetString(R.string.save), color = LocalColors.current.danger, onClick = onAccepted), + DialogButtonModel(GetString(android.R.string.cancel), dismissOnClick = true) ) ) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt index aab1421185..14eb2dbe06 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt @@ -85,12 +85,10 @@ internal fun LandingScreen( buttons = listOf( DialogButtonModel( text = GetString(R.string.onboardingTos), - contentDescription = GetString(R.string.AccessibilityId_onboardingTos), onClick = openTerms ), DialogButtonModel( text = GetString(R.string.onboardingPrivacy), - contentDescription = GetString(R.string.AccessibilityId_onboardingPrivacy), onClick = openPrivacyPolicy ) ) diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt index 83fca7fe7a..bbf075ca7c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt @@ -573,13 +573,11 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() { buttons = listOf( DialogButtonModel( text = GetString(R.string.save), - contentDescription = GetString(R.string.AccessibilityId_save), enabled = state is TempAvatar, onClick = saveAvatar ), DialogButtonModel( text = GetString(R.string.remove), - contentDescription = GetString(R.string.AccessibilityId_remove), color = LocalColors.current.danger, enabled = state is UserAvatar || // can remove is the user has an avatar set (state is TempAvatar && state.hasAvatar), diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt index c4770f2110..988220960e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt @@ -55,7 +55,6 @@ import org.thoughtcrime.securesms.ui.theme.bold class DialogButtonModel( val text: GetString, - val contentDescription: GetString = text, val color: Color = Color.Unspecified, val dismissOnClick: Boolean = true, val enabled: Boolean = true, @@ -130,6 +129,7 @@ fun AlertDialog( textAlign = TextAlign.Center, style = LocalType.current.h7, modifier = Modifier.padding(bottom = LocalDimensions.current.xxsSpacing) + .qaTag(stringResource(R.string.AccessibilityId_modalTitle)) ) } text?.let { @@ -152,6 +152,7 @@ fun AlertDialog( textAlign = TextAlign.Center, style = textStyle, modifier = textModifier + .qaTag(stringResource(R.string.AccessibilityId_modalMessage)) ) } content() @@ -163,7 +164,7 @@ fun AlertDialog( text = it.text(), modifier = Modifier .fillMaxHeight() - .contentDescription(it.contentDescription()) + .qaTag(it.text.string()) .weight(1f), color = it.color, enabled = it.enabled @@ -201,13 +202,11 @@ fun OpenURLAlertDialog( buttons = listOf( DialogButtonModel( text = GetString(R.string.open), - contentDescription = GetString(R.string.AccessibilityId_urlOpenBrowser), color = LocalColors.current.danger, onClick = { context.openUrl(url) } ), DialogButtonModel( text = GetString(android.R.string.copyUrl), - contentDescription = GetString(R.string.AccessibilityId_copy), onClick = { context.copyURLToClipboard(url) Toast.makeText(context, R.string.copied, Toast.LENGTH_SHORT).show() @@ -297,7 +296,8 @@ fun LoadingDialog( title?.let { Text( it, - modifier = Modifier.align(Alignment.CenterHorizontally), + modifier = Modifier.align(Alignment.CenterHorizontally) + .qaTag(stringResource(R.string.AccessibilityId_modalTitle)), style = LocalType.current.large ) } @@ -340,12 +340,10 @@ fun PreviewXCloseDialog() { buttons = listOf( DialogButtonModel( text = GetString(R.string.onboardingTos), - contentDescription = GetString(R.string.AccessibilityId_onboardingTos), onClick = {} ), DialogButtonModel( text = GetString(R.string.onboardingPrivacy), - contentDescription = GetString(R.string.AccessibilityId_onboardingPrivacy), onClick = {} ) ), diff --git a/content-descriptions/src/main/res/values/strings.xml b/content-descriptions/src/main/res/values/strings.xml index 5eaab10ae0..4474dc6c88 100644 --- a/content-descriptions/src/main/res/values/strings.xml +++ b/content-descriptions/src/main/res/values/strings.xml @@ -128,6 +128,9 @@ Voice message Delivered Message request has been accepted + + Modal heading + Modal description Cancel deletion Delete for everyone From d257a1a07267e0c3a9a41e9661cdeb038ac9000d Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 4 Oct 2024 14:20:55 +1000 Subject: [PATCH 14/17] Moving recovery password dialogs to compose for QA --- .../recoverypassword/RecoveryPassword.kt | 57 +++++++++++++++++-- .../RecoveryPasswordActivity.kt | 31 ++-------- 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt index 4bc2724d6d..56ca84efee 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt @@ -26,7 +26,10 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import network.loki.messenger.R +import org.thoughtcrime.securesms.ui.AlertDialog import org.thoughtcrime.securesms.ui.Cell +import org.thoughtcrime.securesms.ui.DialogButtonModel +import org.thoughtcrime.securesms.ui.GetString import org.thoughtcrime.securesms.ui.SessionShieldIcon import org.thoughtcrime.securesms.ui.components.QrImage import org.thoughtcrime.securesms.ui.components.SlimOutlineButton @@ -45,8 +48,8 @@ import org.thoughtcrime.securesms.ui.theme.monospace internal fun RecoveryPasswordScreen( mnemonic: String, seed: String? = null, - copyMnemonic:() -> Unit = {}, - onHide:() -> Unit = {} + confirmHideRecovery: () -> Unit, + copyMnemonic:() -> Unit = {} ) { Column( verticalArrangement = Arrangement.spacedBy(LocalDimensions.current.smallSpacing), @@ -57,7 +60,7 @@ internal fun RecoveryPasswordScreen( .padding(horizontal = LocalDimensions.current.spacing) ) { RecoveryPasswordCell(mnemonic, seed, copyMnemonic) - HideRecoveryPasswordCell(onHide) + HideRecoveryPasswordCell(confirmHideRecovery = confirmHideRecovery) } } @@ -151,7 +154,12 @@ private fun RecoveryPassword(mnemonic: String) { } @Composable -private fun HideRecoveryPasswordCell(onHide: () -> Unit = {}) { +private fun HideRecoveryPasswordCell( + confirmHideRecovery:() -> Unit +) { + var showHideRecoveryDialog by remember { mutableStateOf(false) } + var showHideRecoveryConfirmationDialog by remember { mutableStateOf(false) } + Cell { Row( modifier = Modifier.padding(LocalDimensions.current.smallSpacing) @@ -176,10 +184,44 @@ private fun HideRecoveryPasswordCell(onHide: () -> Unit = {}) { .align(Alignment.CenterVertically) .contentDescription(R.string.AccessibilityId_recoveryPasswordHideRecoveryPassword), color = LocalColors.current.danger, - onClick = onHide + onClick = { showHideRecoveryDialog = true } ) } } + + // recovery hide dialog + if(showHideRecoveryDialog) { + AlertDialog( + onDismissRequest = { showHideRecoveryDialog = false }, + title = stringResource(R.string.recoveryPasswordHidePermanently), + text = stringResource(R.string.recoveryPasswordHidePermanentlyDescription1), + buttons = listOf( + DialogButtonModel( + GetString(R.string.theContinue), + color = LocalColors.current.danger, + onClick = { showHideRecoveryConfirmationDialog = true } + ), + DialogButtonModel(GetString(android.R.string.cancel)) + ) + ) + } + + // recovery hide confirmation dialog + if(showHideRecoveryConfirmationDialog) { + AlertDialog( + onDismissRequest = { showHideRecoveryConfirmationDialog = false }, + title = stringResource(R.string.recoveryPasswordHidePermanently), + text = stringResource(R.string.recoveryPasswordHidePermanentlyDescription2), + buttons = listOf( + DialogButtonModel( + GetString(R.string.yes), + color = LocalColors.current.danger, + onClick = confirmHideRecovery + ), + DialogButtonModel(GetString(android.R.string.cancel)) + ) + ) + } } @Preview @@ -188,6 +230,9 @@ private fun PreviewRecoveryPasswordScreen( @PreviewParameter(SessionColorsParameterProvider::class) colors: ThemeColors ) { PreviewTheme(colors) { - RecoveryPasswordScreen(mnemonic = "voyage urban toyed maverick peculiar tuxedo penguin tree grass building listen speak withdraw terminal plane") + RecoveryPasswordScreen( + mnemonic = "voyage urban toyed maverick peculiar tuxedo penguin tree grass building listen speak withdraw terminal plane", + confirmHideRecovery = {} + ) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordActivity.kt index 543938757c..a6d38c13a0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordActivity.kt @@ -24,33 +24,12 @@ class RecoveryPasswordActivity : BaseActionBarActivity() { RecoveryPasswordScreen( mnemonic = mnemonic, seed = seed, - copyMnemonic = viewModel::copyMnemonic, - onHide = ::onHide + confirmHideRecovery = { + viewModel.permanentlyHidePassword() + finish() + }, + copyMnemonic = viewModel::copyMnemonic ) } } - - private fun onHide() { - showSessionDialog { - title(R.string.recoveryPasswordHidePermanently) - text(R.string.recoveryPasswordHidePermanentlyDescription1) - dangerButton(R.string.theContinue, R.string.AccessibilityId_theContinue) { onHideConfirm() } - cancelButton() - } - } - - private fun onHideConfirm() { - showSessionDialog { - title(R.string.recoveryPasswordHidePermanently) - text(R.string.recoveryPasswordHidePermanentlyDescription2) - cancelButton() - dangerButton( - R.string.yes, - contentDescription = R.string.AccessibilityId_recoveryPasswordHidePermanentlyConfirm - ) { - viewModel.permanentlyHidePassword() - finish() - } - } - } } From a3abf94b6bbfe9e9dabd25267bb1be73fc69d113 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Fri, 4 Oct 2024 14:23:59 +1000 Subject: [PATCH 15/17] Latest translations --- .../src/main/res/values-b+az+AZ/strings.xml | 8 +++ .../src/main/res/values-b+be+BY/strings.xml | 2 +- .../src/main/res/values-b+cs+CZ/strings.xml | 6 +- .../src/main/res/values-b+de+DE/strings.xml | 18 ++--- .../src/main/res/values-b+hi+IN/strings.xml | 14 ++-- .../src/main/res/values-b+hu+HU/strings.xml | 4 +- .../src/main/res/values-b+it+IT/strings.xml | 3 + .../src/main/res/values-b+ja+JP/strings.xml | 66 +++++++++++-------- .../src/main/res/values-b+kmr+TR/strings.xml | 11 ++-- .../src/main/res/values-b+lv+LV/strings.xml | 8 +++ .../src/main/res/values-b+ru+RU/strings.xml | 2 +- .../src/main/res/values-b+sk+SK/strings.xml | 1 + .../src/main/res/values-b+zh+CN/strings.xml | 4 +- 13 files changed, 89 insertions(+), 58 deletions(-) diff --git a/libsession/src/main/res/values-b+az+AZ/strings.xml b/libsession/src/main/res/values-b+az+AZ/strings.xml index 3ef8ce5211..04281cdddc 100644 --- a/libsession/src/main/res/values-b+az+AZ/strings.xml +++ b/libsession/src/main/res/values-b+az+AZ/strings.xml @@ -143,6 +143,7 @@ Zəng davam edir {name} sizə zəng edir Gələn zəng + Mikrofon müraciətinə icazə vermədiyiniz üçün {name} edən zəngi buraxdınız. Buraxılmış zəng {name} kontaktından buraxılmış zəng Səsli və görüntülü zənglər, cihazınızın sistem ayarlarında bildirişlərin fəallaşdırılmasını tələb edir. @@ -202,6 +203,7 @@ İcma dəvəti İcmaya qoşul {community_name} icmasına qoşulmaq istədiyinizə əminsiniz? + İcmaya qoşulma uğursuz oldu Ya da bunlardan birinə qoşulun... İcmaya qoşuldu Artıq bu icmanın üzvüsünüz. @@ -310,6 +312,7 @@ Silmə növü Bu ayar, bu danışıqda hər kəsə aiddir. Bu ayar, bu danışıqda göndərdiyiniz mesajlara aiddir. + Bu ayar, bu danışıqdakı hər kəsə tətbiq olunur.\nYalnız qrup adminləri bu ayarı dəyişdirə bilər. {disappearing_messages_type} olduqdan {time} sonra yox olur Oxunduqdan sonra yox olur Mesajlar oxunduqdan sonra silinir. @@ -406,6 +409,7 @@ Dəvət göndərilir Dəvət göndərildi Qrup dəvəti uğurludur + İstifadəçilər dəvətləri qəbul etmək üçün ən son versiyaya sahib olmalıdırlar Siz qrupa qoşulmağa dəvət edildiniz. Siz digər {count} nəfər qrupa qoşulmaq üçün dəvət edildiniz. Siz{other_name} qrupa qoşulmaq üçün dəvət edildiniz. @@ -673,9 +677,11 @@ Parol təyin et Parolunuz təyin edildi. Lütfən, onu güvəndə saxlayın. Yapışdır + Fayl, musiqi və səs göndərə bilməyiniz üçün {app_name} musiqi və səslərə müraciət etməlidir, ancaq bu icazəyə birdəfəlik rədd cavabı verilib. Ayarlar → \"İcazələr\"ə toxunun və \"Musiqi və səs\"i işə salın. {app_name} media qoşmalarını oxutmaq üçün Apple Music-i istifadə etməlidir. Avto-güncəlləmə Açılışda güncəlləmələri avto-yoxla + Foto və video göndərə bilməyiniz üçün {app_name} kameraya müraciət etməlidir, ancaq bu icazəyə birdəfəlik rədd cavabı verilib. Ayarlar → \"İcazələr\"ə toxunun və \"Kamera\"nı işə salın. {app_name} tətbiqinin ekran kilidi özəlliyi Face ID istifadə edir. Sistem çubuğunda tut Pəncərəni bağladıqda {app_name} arxaplanda işləməyə davam edir @@ -685,7 +691,9 @@ {app_name} gizlilik ayarlarında mikrofona müraciəti fəallaşdıra bilərsiniz {app_name} zəng etmək və səsli mesajlar yazmaq üçün mikrofona müraciət etməlidir. Mikrofona müraciətə icazə verin. + Fayl, musiqi və səs göndərə bilməyiniz üçün {app_name} musiqi və səslərə müraciət etməlidir. İcazə tələb edilir + Foto və video göndərə bilməyiniz üçün {app_name} foto kitabxanasına müraciət etməlidir, ancaq bu icazəyə birdəfəlik rədd cavabı verilib. Ayarlar → \"İcazələr\"ə toxunun və \"Foto və videolar\"ı işə salın. {app_name}, qoşmaları göndərə və saxlaya bilməyiniz üçün anbara müraciət etməlidir. Ayarlar → İcazələr bölməsinə gedin və \"Anbar\"ı işə salın. {app_name} qoşmaları və medianı saxlamaq üçün anbara müraciət etməlidir. {app_name} foto və videoları saxlamaq üçün anbara müraciət etməlidir, ancaq bu icazəyə həmişəlik rədd cavabı verilib. Lütfən tətbiq ayarlarına gedin, \"İcazələr\"i seçin və \"Anbar\" icazəsini fəallaşdırın. diff --git a/libsession/src/main/res/values-b+be+BY/strings.xml b/libsession/src/main/res/values-b+be+BY/strings.xml index d3a809d738..1e8c223c43 100644 --- a/libsession/src/main/res/values-b+be+BY/strings.xml +++ b/libsession/src/main/res/values-b+be+BY/strings.xml @@ -755,7 +755,7 @@ Некаторыя з слоў у вашым Recovery password няправільныя. Калі ласка, праверце і паспрабуйце яшчэ раз. The Recovery Password you entered is not long enough. Please check and try again. Няправільны Recovery Password - Для загрузкі вашага акаўнта ўвядзіце ваш Recovery Password. + Для загрузкі вашага ўліковага запісу ўвядзіце Recovery Password. Схаваць Recovery Password назусім Без вашага Recovery password вы не зможаце загрузіць свой уліковы запіс на новыя прылады. \n\nМы настойліва рэкамендуем захаваць ваш Recovery password у надзейным і бяспечным месцы перад прадаўжэннем. Вы ўпэўненыя, што жадаеце пастаянна схаваць ваш канчатковы пароль аднаўлення на гэтай прыладзе? Гэта немагчыма адмяніць. diff --git a/libsession/src/main/res/values-b+cs+CZ/strings.xml b/libsession/src/main/res/values-b+cs+CZ/strings.xml index 008189031e..d6ad67f64b 100644 --- a/libsession/src/main/res/values-b+cs+CZ/strings.xml +++ b/libsession/src/main/res/values-b+cs+CZ/strings.xml @@ -653,7 +653,7 @@ {message_count} nových zpráv v {conversation_count} konverzacích Vibrace Vypnuto - Okay + OK Zap. Vytvořit účet Účet vytvořen @@ -806,7 +806,7 @@ Vyčistit data Konverzace Nápověda - Pozvat přítele + Pozvat přátele Žádosti o komunikaci Upozornění Oprávnění @@ -816,7 +816,7 @@ Nastavit Pro použití nových nastavení musíte restartovat {app_name}. Sdílet - Pozvěte svého přítele nebo přítelkyni ke komunikaci pomocí {app_name} sdílením svého ID účtu. + Pozvěte své přátele ke komunikaci pomocí {app_name} sdílením svého ID účtu. Sdílejte se svými přáteli tam, kde s nimi obvykle mluvíte — a pak konverzaci přesuňte sem. Při otevírání databáze se vyskytl problém. Prosím, restartujte aplikaci a zkuste to znovu. Sdílet do {app_name} diff --git a/libsession/src/main/res/values-b+de+DE/strings.xml b/libsession/src/main/res/values-b+de+DE/strings.xml index b4ef2e65dd..9013b040bb 100644 --- a/libsession/src/main/res/values-b+de+DE/strings.xml +++ b/libsession/src/main/res/values-b+de+DE/strings.xml @@ -146,7 +146,7 @@ Du hast einen Anruf von {name} verpasst, weil Du keinen Mikrofonzugriff gewährt hast. Verpasster Anruf Verpasster Anruf von {name} - Sprach- und Videoanrufe erfordern Benachrichtigungen, die in den Systemeinstellungen Ihres Geräts aktiviert sind. + Sprach- und Videoanrufe erfordern Benachrichtigungen, die in den Systemeinstellungen deines Geräts aktiviert werden können. Anrufberechtigung erforderlich Du kannst die Berechtigung für \"Sprach- und Videoanrufe\" in den Datenschutzeinstellungen aktivieren. Wiederverbinden… @@ -176,7 +176,7 @@ Daten konnten nicht von %1$d Serviceknoten gelöscht werden. Service Node ID: %2$s. Daten konnten nicht von %1$d Serviceknoten gelöscht werden. Service Node IDs: %2$s. - Ein unbekannter Fehler ist aufgetreten und deine Daten wurden nicht gelöscht. Möchtest du stattdessen Ihre Daten nur von diesem Gerät löschen? + Ein unbekannter Fehler ist aufgetreten, und deine Daten wurden nicht gelöscht. Möchtest du stattdessen deine Daten nur von diesem Gerät entfernen? Gerät entfernen Geräte- und Netzwerkdaten löschen Bist du sicher, dass du deine Daten aus dem Netzwerk löschen möchtest? Wenn du fortfährst, kannst du deine Nachrichten oder Kontakte nicht wiederherstellen. @@ -243,7 +243,7 @@ Gruppen Nachrichtenkürzung Communities kürzen - Löschen Sie Nachrichten aus Community-Gesprächen, die älter als 6 Monate sind und bei denen es mehr als 2.000 Nachrichten gibt. + Lösche Nachrichten von Community-Konversationen, die älter als 6 Monate sind, und wo es über 2.000 Nachrichten gibt. Neue Unterhaltung Du hast noch keine Unterhaltungen Mit Eingabetaste senden @@ -331,7 +331,7 @@ Zeitraum {name} hat verschwindende Nachrichten deaktiviert. Nachrichten verschwinden nicht mehr. {name} hat verschwindende Nachrichten deaktiviert. - Sie haben verschwindende Nachrichten deaktiviert. Nachrichten, die Sie senden, verschwinden nicht mehr. + Du hast verschwindende Nachrichten deaktiviert. Die von dir gesendeten Nachrichten verschwinden nicht mehr. Du hast verschwindende Nachrichten deaktiviert. gelesen gesendet @@ -478,7 +478,7 @@ Andere ausblenden Bild Inkognito-Tastatur - Fordere den Inkognito-Modus an, wenn verfügbar. Dies hängt von der Tastatur ab, die du verwendest, deine Tastatur könnte diese Anfrage ignorieren. + Fordere den Inkognito-Modus an, wenn verfügbar. Abhängig von der Tastatur, die du verwendest, kann deine Tastatur diese Anfrage ignorieren. Info Ungültige Verknüpfung Beitreten @@ -540,7 +540,7 @@ Diese Nachricht ist leer. Nachrichtenübermittlung gescheitert Nachrichtenlimit erreicht - Eine Nachricht verschlüsselt mit einer alten Version von {app_name} erhalten, die nicht mehr unterstützt wird. Bitte fragen Sie den Absender, auf die neueste Version zu aktualisieren und die Nachricht erneut zu senden. + Eine Nachricht wurde mit einer alten Version von {app_name} verschlüsselt, die nicht mehr unterstützt wird. Bitte den Absender, auf die neueste Version zu aktualisieren und die Nachricht erneut zu senden. Originalnachricht nicht gefunden Nachrichten-Info Als gelesen markieren @@ -556,14 +556,14 @@ Du hast %1$d neue Nachrichten. Antwort auf - {name} hat Sie eingeladen, der Gruppe {group_name} beizutreten. + {name} hat dich eingeladen, der Gruppe {group_name} beizutreten. Das Senden einer Nachricht an diese Gruppe bestätigt automatisch die Gruppeneinladung. Deine Nachrichtenanfrage ist derzeit ausstehend. Du kannst Sprachnachrichten und Anhänge senden, sobald der Empfänger diese Nachrichtenanfrage genehmigt hat. Du hast die Nachrichtenanfrage von {name} angenommen. Das Senden einer Nachricht an dieser Person bestätigt automatisch die Nachrichtenanfrage und gibt deine Account-ID bekannt. Deine Nachrichtenanfrage wurde akzeptiert. - Sind Sie sich sicher, dass Sie alle Nachrichtenanforderungen und Gruppeneinladungen löschen möchten? + Bist du sich sicher, dass du alle Nachrichtenanforderungen und Gruppeneinladungen löschen möchtest? Community-Nachrichtenanfragen Erlaube Nachrichtenanfragen von Community-Unterhaltungen. Bist du sicher, dass du diese Nachrichtenanfrage löschen möchten? @@ -757,7 +757,7 @@ Scannen Bildschirmschutz Bildschirmfoto-Benachrichtigungen - Erhalte eine Benachrichtigung, wenn ein Kontakt ein Bildschirmfoto eines Eins-zu-eins-Chats erstellt. + Erhalte eine Benachrichtigung, wenn ein Kontakt ein Bildschirmfoto in einer Unterhaltung macht. {name} hat einen Screenshot gemacht. Suchen Kontakte durchsuchen diff --git a/libsession/src/main/res/values-b+hi+IN/strings.xml b/libsession/src/main/res/values-b+hi+IN/strings.xml index 1e3416aa90..73c6f9b51a 100644 --- a/libsession/src/main/res/values-b+hi+IN/strings.xml +++ b/libsession/src/main/res/values-b+hi+IN/strings.xml @@ -21,7 +21,7 @@ क्या आप वाकई {name} और {count} अन्य को एडमिन के रूप में बढ़ावा देना चाहते हैं? एडमिन्स को हटाया नहीं जा सकता है। एडमिन में पदोन्नत करें क्या आप वाकई {name} और {other_name} को एडमिन के रूप में बढ़ावा देना चाहते हैं? एडमिन्स को हटाया नहीं जा सकता है। - {name} को Admin बनाया गया। + {name} को एडमिन बनाया गया। एडमिन पदोन्नति विफल रही {name} को {group_name} में पदोन्नत करने में विफल {name} और {count} अन्य को {group_name} में पदोन्नत करने में विफल @@ -33,7 +33,7 @@ {name} को एडमिन के रूप में हटाने में विफल। {name} और {count} अन्य को व्यवस्थापक पद से हटाने में विफल | {name} और {other_name} व्यवस्थापक पद से हटाने में विफल | - {name} को Admin से हटा दिया गया। + {name} को एडमिन से हटा दिया गया। {name} और {count} अन्य को व्यवस्थापक पद से हटा दिया गया | {name} and {other_name} को व्यवस्थापक पद से हटा दिया गया | एडमिन प्रमोशन भेजा जा रहा है @@ -295,7 +295,7 @@ सभी उपकरणों पर मिटाएँ सभी के लिए मिटायें | - संदेश को हटाने में विफल रहा + संदेश हटाने में विफल संदेशों को हटाने में विफल रहा क्या आप वाकई इन संदेशों को मिटाना चाहते हैं? @@ -421,7 +421,7 @@ {name} ने समूह छोड़ दिया। {name} और {count} अन्य समूह से निकल गए। {name} और {other_name} समूह से निकल गए। - {name} समूह में शामिल हो गए। + {name} समूह में शामिल के लिए आमंत्रित किया है। {name} को समूह में शामिल होने के लिए आमंत्रित किया गया। चैट इतिहास साझा किया गया। {name} और {count} अन्य को समूह में शामिल होने के लिए आमंत्रित किया गया। चैट इतिहास साझा किया गया। {name} और {other_name} को समूह में शामिल होने के लिए आमंत्रित किया गया। चैट इतिहास साझा किया गया। @@ -527,7 +527,7 @@ खाता आईडी या ONS जोड़ें मित्रों को आमंत्रित करें - आमंत्रण सेंड करें + आमंत्रण भेजे आमंत्रण सेंड करें क्या आप {name} के साथ समूह संदेश इतिहास साझा करना चाहेंगे? @@ -684,7 +684,7 @@ {app_name} को फ़ोटो और वीडियो लेने के लिए कैमरा अनुमति की आवश्यकता होती है, लेकिन इसे स्थायी रूप से मना कर दिया गया है। सेटिंग्स → अनुमतियां पर टैप करें और \"कैमरा\" चालू करें। {app_name} पर स्क्रीन लॉक फीचर Face ID का उपयोग करता है। सिस्टम ट्रे में रखें - {app_name} तब भी पृष्ठभूमि में चलता रहता है जब आप विंडो बंद करते हैं + जब आप विंडो बंद करते हैं तो {app_name} पृष्ठभूमि में चलता रहता है {app_name} को जारी रखने के लिए फ़ोटो लाइब्रेरी पहुंच की आवश्यकता है। आप iOS सेटिंग्स में पहुंच सक्षम कर सकते हैं। माइक्रोफ़ोन {app_name} को कॉल करने और ऑडियो संदेश भेजने के लिए माइक्रोफ़ोन अनुमति की आवश्यकता है, लेकिन इसे स्थायी रूप से मना कर दिया गया है। सेटिंग्स → अनुमतियां पर टैप करें, और \"माइक्रोफ़ोन\" चालू करें। @@ -812,7 +812,7 @@ अपडेट इंस्टॉल हो गया, पुनः प्रारंभ करने के लिए क्लिक करें अपडेट डाउनलोड हो रहा है: {percent_loader}% अद्यतन नहीं हो रहा - {app_name} अपडेट होने में विफल. कृपया {session_download_url} पर जाएं और नए संस्करण को मैन्युअल रूप से इंस्टॉल करें, फिर इस समस्या के बारे में हमें बताने के लिए हमारे सहायता केंद्र से संपर्क करें | + {app_name} अपडेट होने में विफल. कृपया {session_download_url} पर जाएं और नए संस्करण को मैन्युअल रूप से इंस्टॉल करें, फिर इस समस्या के बारे में हमें हमारे सहायता केंद्र से संपर्क करें | {app_name} का एक नया संस्करण उपलब्ध है, अपडेट करने के लिए टैप करें {app_name} का एक नया संस्करण उपलब्ध है। रिलीज़ नोट्स पे जाइए diff --git a/libsession/src/main/res/values-b+hu+HU/strings.xml b/libsession/src/main/res/values-b+hu+HU/strings.xml index a7e3379924..e3362e7000 100644 --- a/libsession/src/main/res/values-b+hu+HU/strings.xml +++ b/libsession/src/main/res/values-b+hu+HU/strings.xml @@ -60,7 +60,7 @@ Melléklet Melléklet hozzáadása Névtelen album - Csatolmányok automatikus letöltése + Mellékletek automatikus letöltése Média és fájlok automatikus letötltése ebből a beszélgetésből. Szeretnéd automatikusan letölteni az összes fájlt a {conversation_name} beszélgetésből? Automatikus letöltés @@ -563,7 +563,7 @@ Elfogadtad {name} üzenetkérését. Ha üzenetet küld ennek a felhasználónak, akkor automatikusan elfogadja az üzenetkérelmét és a Felhasználó ID megosztásra kerül. Az üzenetkérelmedet elfogadták. - Biztos, hogy törölni akarja az összes üzenetkérelmet és csoportmeghívót? + Biztos, hogy törölni szeretnéd az összes üzenetkérelmet és csoportmeghívót? Közösségi üzenetkérelmek A közösségi beszélgetésekből származó üzenetek engedélyezése. Biztos, hogy törölni szeretnéd ezt az üzenetkérelmet? diff --git a/libsession/src/main/res/values-b+it+IT/strings.xml b/libsession/src/main/res/values-b+it+IT/strings.xml index a605f44c58..86c2ed25cb 100644 --- a/libsession/src/main/res/values-b+it+IT/strings.xml +++ b/libsession/src/main/res/values-b+it+IT/strings.xml @@ -143,6 +143,7 @@ Chiamata in corso Chiamata in arrivo da {name} Chiamata in arrivo + Hai perso una chiamata da {name} perché non hai concesso l\'accesso al microfono. Chiamata persa Chiamata persa da {name} Le chiamate vocali e video richiedono che le notifiche siano abilitate nelle impostazioni di sistema del dispositivo. @@ -202,6 +203,7 @@ Invito a una Comunità Unisciti alla Comunità Sei sicuro di voler unirti a {community_name}? + Impossibile unirsi alla community Oppure unisciti a uno di questi... Sei entrato nella Comunità Fai già parte di questa Comunità. @@ -407,6 +409,7 @@ Invio invito Invito inviato Invito al gruppo riuscito + Gli utenti devono disporre della versione più recente per ricevere gli inviti Sei stata invitato a unirti al gruppo. Tu e {count} altri vi siete uniti al gruppo. Tu e {other_name} fate ora parte del gruppo. diff --git a/libsession/src/main/res/values-b+ja+JP/strings.xml b/libsession/src/main/res/values-b+ja+JP/strings.xml index c394f9bcd4..93344315ff 100644 --- a/libsession/src/main/res/values-b+ja+JP/strings.xml +++ b/libsession/src/main/res/values-b+ja+JP/strings.xml @@ -36,8 +36,9 @@ {name} はアドミンから削除されました {name}{count}名 がAdminから削除されました。 {name}{other_name} がAdminに昇格しました。 - 管理者への昇進を送信中 + アドミンへの昇進を送信中 アドミン設定 + {name}{other_name} がアドミンに昇格しました +{count} 匿名 オートダークモード @@ -150,7 +151,7 @@ プライバシー設定で「音声とビデオ通話」の許可を有効にできます。 再接続しています... 呼び出し中... - {app_name} Call + {app_name} 電話 通話 (ベータ版) 音声とビデオ通話 音声通話とビデオ通話 (ベータ版) @@ -236,7 +237,7 @@ {conversation_name} にはメッセージがありません。 キーを入力 会話中のEnterキーの機能 - SHIFT + ENTER 送信, ENTER 改行 + シフト + エンター 送信、エンター 改行 エンターでメッセージを送信、シフト + エンターで改行を開始 グループ メッセージの削減 @@ -244,10 +245,11 @@ 6ヶ月以上のコミュニティと2,000以上のメッセージがあるコミュニティからメッセージを削除します。 新しい会話 まだ通知はありません - Enter キーで送信 + エンターキーで送信 Enterキーをタップすると、改行ではなく、メッセージが送信されます。 すべてのメディア スペルチェック + メッセージを入力するときにスペルチェックを有効にします 会話を開始する コピーしました コピーする @@ -316,8 +318,9 @@ 送信後に消えます - {time} 設定をフォロー 送信したメッセージはもう消滅しません。消滅メッセージをオフにしてもよろしいですか? - あなたのメッセージを{time}後に{disappearing_messages_type}消えるように設定しますか? + メッセージを{time}後に{disappearing_messages_type}消えるようにセットしますか? {name}は古いクライアントを使用しています。消えるメッセージが期待通りに動作しない場合があります。 + この設定はグループアドミンのみ変更可能です 送信済み {name} が {time} になった後、{disappearing_messages_type}メッセージが消えるように設定しました。 You は {time} になった後、{disappearing_messages_type}メッセージが消えるように設定しました。 @@ -327,7 +330,7 @@ You消えるメッセージをオフにしました。送信されたメッセージは消えなくなります。 あなた は消えているメッセージを オフにしました。 既読 - 送信 + 送信済み {admin_name}が消えるメッセージの設定を更新しました You は消えるメッセージの設定を更新しました キャンセル @@ -338,7 +341,7 @@ 表示名を読み込めませんでした。続行するには新しい表示名を入力してください。 新しい表示名を選択してください 表示名を選択してください - 表示名を設定 + 表示名をセット ドキュメント 完了 ダウンロード @@ -351,11 +354,15 @@ フラグ 食べ物・飲み物 オブジェクト - スマイル &amp; 人 + 最近使用 + スマイリーと人 記号 旅行&場所 すべての項目の{emoji}を削除してもよろしいですか? - スローダウンしました。絵文字リアクターが多すぎます。しばらくしてからもう一度試してください。 + スローダウンしてください。絵文字リアクションが多すぎます。しばらくしてからもう一度試してください。 + + %1$d が %2$s をこのメッセージに反応しました + {name}が{emoji_name}でリアクションしました {name}と{other_name}が{emoji_name}でリアクションしました {name}と{count}その他が{emoji_name}で反応しました @@ -388,7 +395,7 @@ グループエラー グループの作成に失敗しました。インターネット接続を確認して、もう一度やり直してください。 {group_name} への参加に失敗しました - Set Group Information + グループの詳細をセット 本当にこのグループ招待を削除しますか? 招待に失敗しました {name} と他 {count} 人を {group_name} に招待できませんでした @@ -446,13 +453,13 @@ {group_name}から削除されました。 あなた{count}名 がグループから削除されました。 あなた{other_name} がグループから削除されました。 - グループのアイコン画像を設定 + グループのアイコン画像をセット 不明なグループ グループが更新されました よくある質問 {app_name}の翻訳にご協力ください バグを報告 - 詳細を共有して、私たちが問題を解決するのを手伝ってください。ログをエクスポートし、{app_name}のヘルプデスクを通じてファイルをアップロードしてください。 + 詳細を共有して問題解決にご協力ください。ログをエクスポートして、{app_name}のヘルプデスクからファイルをアップロードしてください ログのエクスポート ログをエクスポートし、{app_name} のヘルプデスクにてファイルをアップロードします。 デスクトップに保存 @@ -479,12 +486,12 @@ {name}{other_name} がグループに加わりました あなたがグループに加わりました リンクプレビュー - サポートされている URL のリンクプレビューを表示します。 + サポートされている URL のリンクプレビューを表示します リンクプレビューを有効にする リンクプレビューを読み込めません セキュアでないリンクのプレビューは読み込めません 送受信する URL のプレビューを表示します。これは便利ですが、{app_name} はプレビューを生成するためにリンクされた サイトにアクセスする必要があります。 {app_name} の設定でいつでもリンクのプレビューをオフにできます。 - リンクプレビューを送る + リンクプレビューを表示 リンクのプレビューを送信するとき、完全なメタデータ保護はありません。 リンクプレビューが無効です {app_name}は、送受信するリンクのプレビューを生成するためにリンクされたウェブサイトに接続する必要があります。\n\n{app_name}の設定でプレビューをオンにできます。 @@ -516,8 +523,8 @@ {name}にグループメッセージ履歴を共有しますか? {name}{count}人にグループメッセージ履歴を共有しますか? {name}{other_name}にグループメッセージ履歴を共有しますか? - Share message history - Share new messages only + メッセージ履歴を共有 + 新しいメッセージのみを共有 招待 メッセージ このメッセージは空です。 @@ -542,7 +549,7 @@ メッセージ・リクエストは現在承認待ちです。 受信者がこのメッセージリクエストを承認すると、音声メッセージと添付ファイルを送信できます. {name}さんのメッセージリクエストを承認しました - このユーザーにメッセージを送信すると、自動的にメッセージリクエストが承認され、あなたのAccount IDが公開されます。 + このユーザーにメッセージを送ると、メッセージリクエストが自動的に承認され、アカウントIDが公開されます。 メッセージ・リクエストが承認されました。 本当に全てのメッセージリクエストとグループ招待を消去しますか? コミュニティメッセージリクエスト @@ -568,7 +575,7 @@ {name}のニックネームを選んでください。これが1対1およびグループ会話で表示されます。 ニックネームを入力してください ニックネームを削除 - Set Nickname + ニックネームをセット いいえ 候補はありません なし @@ -594,6 +601,7 @@ {device}の再起動中にメッセージが届いたかもしれません LED色 メンションのみ + メッセージ通知 最新の受信: {name} ミュート {time_large}間ミュート @@ -630,7 +638,7 @@ {app_name}は、{app_name}の分散型ネットワークの複数のService Nodeを介してメッセージをバウンスすることにより、IPアドレスを隠します。これが現在の経路です: 目的先 エントリーノード - Service Node + サービスノード 国名が不明 このONSを認識できませんでした。内容を確認して再度お試しください。 このONSを検索できませんでした。後でもう一度お試しください。 @@ -642,6 +650,7 @@ パスワードを再確認 パスワードを作成してください 現在のパスワードが間違っています。 + {app_name} のロックを解除するにはパスワードが必要です パスワードを入力してください 現在のパスワードを入力してください 新しいパスワードを入力してください @@ -653,7 +662,7 @@ パスワードを削除 {app_name} のロックを解除するために必要なパスワードを削除します パスワードを削除しました。 - パスワードを設定 + パスワードをセット パスワードが設定されました。安全に保管してください。 貼り付け {app_name} は、ファイル、音楽、およびオーディオを送信するために音楽およびオーディオアクセスが必要ですが、それが恒久的に拒否されています。設定に移動して、「権限」を選択し、「音楽およびオーディオ」を有効にしてください。 @@ -685,20 +694,21 @@ プロフィール ディスプレイの画像 表示画像の削除に失敗しました。 - ディスプレイの画像を設定 + ディスプレイの画像をセット 小さいファイルを選んでください プロフィールを更新できませんでした 昇格 QR コード このQRコードにはアカウントIDが含まれていません このQRコードにはリカバリーパスワードが含まれていません - QRコードを読み取る + QRコードをスキャン QRコードを表示 + 友達があなたのQRコードをスキャンすることでメッセージを送信できます {app_name} を終了 終了 既読 既読通知 - 送信したすべてのメッセージに対する既読通知を表示します。 + 送信したすべてのメッセージに対する既読通知を表示します 受信: オススメ リカバリーパスワードを保存して、アカウントにアクセスできなくならないようにしてください @@ -733,8 +743,8 @@ 保存済みのメッセージ 保存中... スキャン - スクリーン・セキュリティ - スクリーンショット撮影時の通知 + スクリーンセキュリティ + スクリーンショット通知 連絡先が1対1チャットのスクリーンショットを撮ったときに通知を受け取ります {name}はスクリーンショットを撮りました 検索 @@ -768,12 +778,12 @@ 新しい設定を適用するために {app_name} を再起動する必要があります. 共有 友達を{app_name} に招待して、チャットを始めましょう。アカウントIDを共有して招待できます。 - いつもどこでも友達と共有してください — ここで会話を移動します。 + いつでもどこでも友達と共有 — ここで会話を始めましょう データベースを開く際に問題が発生しました。アプリを再起動して再度お試しください。 {app_name}に共有 表示 すべて表示 - 最小化 + 少なく表示 ステッカー サポートページへ システム情報: {information} @@ -782,7 +792,7 @@ エラー 再試行 入力中アイコン - 入力中アイコンを表示する + 入力中アイコンを表示 元に戻す 不明 アプリ更新 diff --git a/libsession/src/main/res/values-b+kmr+TR/strings.xml b/libsession/src/main/res/values-b+kmr+TR/strings.xml index 06d2c404f5..6654388716 100644 --- a/libsession/src/main/res/values-b+kmr+TR/strings.xml +++ b/libsession/src/main/res/values-b+kmr+TR/strings.xml @@ -143,6 +143,7 @@ Bangê Bejeziyene Gerîna hatî ji {name} Gerîna habe + Te ji telefona ji {name} hatî ma, ji ber ku te destûra gihîna mîkrofonê nedaye. Gerîna negerîl Gerîna nececawdayî ji {name} Lêgerînên Dengî û Vîdeoyî div têgehin Navigationda dê system tê bikeviya nizanaran divê Troll karibe binšiyan @@ -278,7 +279,7 @@ Bi ser neket ku komê biguherînin Îzna te tine ye ku mesajên kesên din jê bibî - Peyama Jê Bibe + Peyamê Jê Bibe Peyaman Jê Bibe Tu piştrast î ku tu dixwazî vê peyamê jê bibî? @@ -295,7 +296,7 @@ Ji bo tevan jê bibe Bi ser neket ku peyama jê derbike. - Bi ser neket ku peyam nebe derbike. + Bi ser neket ku peyaman jê bibe. Tu piştrast î ku tu dixwazî peyamên van jê bibî? Tu piştrast î ku tu dixwazî vê peyaman tenê li ser cîhaza vê peyaman jê bibî? @@ -520,7 +521,7 @@ %1$d endam - %1$d endamê aktîf + %1$d endamê aktîv %1$d endamên aktîf Add Account ID or ONS @@ -551,7 +552,7 @@ Bi navê hesabê hevalê xwe Account ID an ONS-ê têlepeqîne. Bi navê hesabê hevalê xwe Account ID, ONS an scanê QR code-yê têlepeqîne. - Tu peyama nûyeke hatî gotandî hiştî. + Peyameke te yê nû heye. %1$d peyama nû hîn tuneyê. Cewab didî @@ -763,7 +764,7 @@ Li söylek bigerrin Kerem bike tu li ser Giphy ne girêdane - ne têketina gêrê, usbikirina tambûra têkeve - %1$d ji %2$d lihevhatû + %1$d ji %2$d li hev tê %1$d li li %2$d yên din Encam peyda nebû diff --git a/libsession/src/main/res/values-b+lv+LV/strings.xml b/libsession/src/main/res/values-b+lv+LV/strings.xml index 0b7a1c6a13..7e43c0cead 100644 --- a/libsession/src/main/res/values-b+lv+LV/strings.xml +++ b/libsession/src/main/res/values-b+lv+LV/strings.xml @@ -397,6 +397,9 @@ {name} un {count} citi atstāja grupu. {name} un {other_name} atstāja grupu. Grupai pievienojās {name}. + {name} uzaicināts pievienoties grupai un sarakstes vēsture tam pieejama. + {name} un {count} others uzaicināti pievienoties grupai. + {name} un {other_name} uzaicināti pievienoties grupai. Tu atstāji grupu. Grupas dalībnieki Šajā grupā nav citu dalībnieku. @@ -494,6 +497,11 @@ Ziņas informācija Atzīmēt kā izlasītu Atzīmēt kā nelasītu + + Jauna ziņa + Jauna ziņa + Jauna ziņa + Sāc jaunu sarunu, ievadot drauga Konta ID vai ONS. Sāc jaunu sarunu, ievadot drauga Konta ID, ONS vai skenējot viņu QR kodu. diff --git a/libsession/src/main/res/values-b+ru+RU/strings.xml b/libsession/src/main/res/values-b+ru+RU/strings.xml index bb19b83fbd..a5d2d42e59 100644 --- a/libsession/src/main/res/values-b+ru+RU/strings.xml +++ b/libsession/src/main/res/values-b+ru+RU/strings.xml @@ -531,7 +531,7 @@ Максимальный Медиа - %1$d участник + %1$d Участник %1$d участника %1$d участников %1$d участников diff --git a/libsession/src/main/res/values-b+sk+SK/strings.xml b/libsession/src/main/res/values-b+sk+SK/strings.xml index cbf903bc60..8bd494edb4 100644 --- a/libsession/src/main/res/values-b+sk+SK/strings.xml +++ b/libsession/src/main/res/values-b+sk+SK/strings.xml @@ -143,6 +143,7 @@ Prebiehajúci hovor Prichádzajúci hovor od {name} Prichádzajúci hovor + Zmeškali ste hovor od {name}, pretože ste neudelili prístup k mikrofónu. Zmeškaný hovor Zmeškaný hovor od {name} Hlasové a video hovory vyžadujú povolenie upozornení v systémových nastaveniach vášho zariadenia. diff --git a/libsession/src/main/res/values-b+zh+CN/strings.xml b/libsession/src/main/res/values-b+zh+CN/strings.xml index d1fbe64a02..ffe42da633 100644 --- a/libsession/src/main/res/values-b+zh+CN/strings.xml +++ b/libsession/src/main/res/values-b+zh+CN/strings.xml @@ -463,9 +463,9 @@ 导出日志 导出您的日志,然后通过{app_name}的帮助服务台上传日志。 保存到桌面 - 将此文件保存到您的桌面,然后与{app_name}开发者分享。 + 将此文件保存到您的桌面,然后与{app_name}开发者分享 支持 - 感谢您的反馈。 + 感谢您的反馈 隐藏 切换系统菜单栏可见性 隐藏其它 From c095427835169778860362089a2b373e94b2dab7 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Mon, 7 Oct 2024 11:59:57 +1100 Subject: [PATCH 16/17] Build process update Cleaned up the variant outputs for the huawei build Added local signing configs Made sure the output names were formatted properly --- app/build.gradle | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 32b75caf37..7ecb6e45f5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,7 @@ android { splits { abi { - enable true + enable !project.hasProperty('huawei') // huawei builds do not need the split variants reset() include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' universalApk true @@ -118,6 +118,25 @@ android { } } + signingConfigs { + play { + if (project.hasProperty('SESSION_STORE_FILE')) { + storeFile file(SESSION_STORE_FILE) + storePassword SESSION_STORE_PASSWORD + keyAlias SESSION_KEY_ALIAS + keyPassword SESSION_KEY_PASSWORD + } + } + huawei { + if (project.hasProperty('SESSION_HUAWEI_STORE_FILE')) { + storeFile file(SESSION_HUAWEI_STORE_FILE) + storePassword SESSION_HUAWEI_STORE_PASSWORD + keyAlias SESSION_HUAWEI_KEY_ALIAS + keyPassword SESSION_HUAWEI_KEY_PASSWORD + } + } + } + flavorDimensions "distribution" productFlavors { play { @@ -129,6 +148,7 @@ android { buildConfigField "org.session.libsession.utilities.Device", "DEVICE", "org.session.libsession.utilities.Device.ANDROID" buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl" buildConfigField 'String', 'PUSH_KEY_SUFFIX', '\"\"' + signingConfig signingConfigs.play } huawei { @@ -138,6 +158,7 @@ android { buildConfigField "org.session.libsession.utilities.Device", "DEVICE", "org.session.libsession.utilities.Device.HUAWEI" buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl" buildConfigField 'String', 'PUSH_KEY_SUFFIX', '\"_HUAWEI\"' + signingConfig signingConfigs.huawei } website { @@ -150,13 +171,15 @@ android { } } - applicationVariants.forEach { variant -> + applicationVariants.configureEach { variant -> variant.outputs.each { output -> def abiName = output.getFilter("ABI") ?: 'universal' def postFix = abiPostFix.get(abiName, 0) + def flavour = (variant.flavorName == 'huawei') ? "-huawei" : "" + if (postFix >= postFixSize) throw new AssertionError("postFix is too large") - output.outputFileName = output.outputFileName = "session-${variant.versionName}-${abiName}.apk" + output.outputFileName = output.outputFileName = "session-${variant.versionName}-${abiName}${flavour}.apk" output.versionCodeOverride = canonicalVersionCode * postFixSize + postFix } } From b5954752c6589f5e0c9fe4dd17d105e49d5d3180 Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Mon, 7 Oct 2024 12:14:59 +1100 Subject: [PATCH 17/17] Using appropriate name --- scripts/drone-static-upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/drone-static-upload.sh b/scripts/drone-static-upload.sh index 0e5209c942..b5c9ee83f7 100755 --- a/scripts/drone-static-upload.sh +++ b/scripts/drone-static-upload.sh @@ -19,7 +19,7 @@ chmod 600 ssh_key # Define the output paths build_dir="app/build/outputs/apk/play/debug" -target_path="${build_dir}/$(ls ${build_dir} | grep -o 'app-[^[:space:]]*-universal-debug.apk')" +target_path="${build_dir}/$(ls ${build_dir} | grep -o 'session-[^[:space:]]*-universal.apk')" # Validate the paths exist if [ ! -d $build_path ]; then