diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/State.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/State.kt index 0fe44b02ed..6fddcbc548 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/State.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/State.kt @@ -25,7 +25,7 @@ data class State( ) { val subtitle get() = when { isGroup || isNoteToSelf -> GetString(R.string.disappearingMessagesDisappearAfterSendDescription) - else -> GetString(R.string.activity_disappearing_messages_subtitle) + else -> GetString(R.string.disappearingMessagesDescription1) } val typeOptionsHidden get() = isNoteToSelf || (isGroup && isNewConfigEnabled) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/EmojiReactionsView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/EmojiReactionsView.kt index 49e4b1044f..06b3c112d5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/EmojiReactionsView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/EmojiReactionsView.kt @@ -11,8 +11,10 @@ import android.widget.TextView import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat import com.google.android.flexbox.JustifyContent +import com.squareup.phrase.Phrase import network.loki.messenger.R import network.loki.messenger.databinding.ViewEmojiReactionsBinding +import org.session.libsession.utilities.StringSubstitutionConstants.COUNT_KEY import org.session.libsession.utilities.TextSecurePreferences.Companion.getLocalNumber import org.session.libsession.utilities.ThemeUtil import org.thoughtcrime.securesms.components.emoji.EmojiImageView @@ -195,7 +197,7 @@ class EmojiReactionsView : ConstraintLayout, OnTouchListener { } else { emojiView.visibility = GONE spacer.visibility = GONE - countView.text = context.getString(R.string.ReactionsConversationView_plus, reaction.count) + countView.text = Phrase.from(context, R.string.andMore).put(COUNT_KEY, reaction.count.toInt()).format() } if (reaction.userWasSender && !isCompact) { root.background = ContextCompat.getDrawable(context, R.drawable.reaction_pill_background_selected) 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 54cdb66932..0dd6f016b8 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 @@ -177,9 +177,14 @@ public class ThreadRecord extends DisplayRecord { } else if (getCount() == 0) { return new SpannableString(context.getString(R.string.messageEmpty)); } else { - // This is shown when we receive a media message from an un-accepted contact + // This block hits when we receive a media message from an unaccepted contact - however, + // unaccepted contacts aren't allowed to send us media - so we'll return an empty string + // if it's JUST an image, or the body text that accompanied the image should any exist. + // We could return null here - but then we have to find all the usages of this + // `getDisplayBody` method and make sure it doesn't fall over if it has a null result. if (TextUtils.isEmpty(getBody())) { - return new SpannableString(emphasisAdded(context.getString(R.string.mediaMessage))); + return new SpannableString(""); + // Old behaviour was: return new SpannableString(emphasisAdded(context.getString(R.string.mediaMessage))); } else { return new SpannableString(getBody()); } diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/PrivacySettingsPreferenceFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/PrivacySettingsPreferenceFragment.kt index aa174ee8e7..ad30b9f16b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/PrivacySettingsPreferenceFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/PrivacySettingsPreferenceFragment.kt @@ -39,7 +39,7 @@ class PrivacySettingsPreferenceFragment : ListSummaryPreferenceFragment() { .onPreferenceChangeListener = TypingIndicatorsToggleListener() findPreference(TextSecurePreferences.CALL_NOTIFICATIONS_ENABLED)!! .onPreferenceChangeListener = CallToggleListener(this) { setCall(it) } - findPreference(getString(R.string.preferences__message_requests_category))?.let { category -> + findPreference(getString(R.string.sessionMessageRequests))?.let { category -> when (val user = configFactory.user) { null -> category.isVisible = false else -> SwitchPreferenceCompat(requireContext()).apply { diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt b/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt index 584910d31d..71f09314cc 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt @@ -49,13 +49,9 @@ class SaveAttachmentTask @JvmOverloads constructor(context: Context, count: Int context.showSessionDialog { title(R.string.permissionsRequired) iconAttribute(R.attr.dialog_alert_icon) - - // ACL TODO - Need a replacement plurals string for the below! - val txt = context.resources.getQuantityString(R.plurals.ConversationFragment_saving_n_media_to_storage_warning, count, count) - text(txt) - - button(R.string.yes) { onAcceptListener() } - button(R.string.no) + text(context.getString(R.string.attachmentsWarning)) + button(R.string.accept) { onAcceptListener() } + button(R.string.cancel) } } } diff --git a/app/src/main/res/layout/activity_disappearing_messages.xml b/app/src/main/res/layout/activity_disappearing_messages.xml index 7d5b3a55b5..461767ff43 100644 --- a/app/src/main/res/layout/activity_disappearing_messages.xml +++ b/app/src/main/res/layout/activity_disappearing_messages.xml @@ -12,7 +12,7 @@ android:layout_height="wrap_content" android:background="?colorPrimary" app:contentInsetStart="0dp" - app:subtitle="@string/activity_disappearing_messages_subtitle" + app:subtitle="@string/disappearingMessagesDescription1" app:subtitleTextAppearance="@style/TextAppearance.Session.ToolbarSubtitle" app:title="@string/disappearingMessages" /> diff --git a/app/src/main/res/layout/fragment_create_group.xml b/app/src/main/res/layout/fragment_create_group.xml index ca143f2c8f..e387684b4a 100644 --- a/app/src/main/res/layout/fragment_create_group.xml +++ b/app/src/main/res/layout/fragment_create_group.xml @@ -138,7 +138,7 @@ android:layout_width="196dp" android:layout_height="@dimen/medium_button_height" android:layout_marginVertical="@dimen/medium_spacing" - android:text="@string/activity_create_closed_group_empty_state_button_title" + android:text="@string/groupCreate" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/fragment_view_my_qr_code.xml b/app/src/main/res/layout/fragment_view_my_qr_code.xml deleted file mode 100644 index 227b1ecd7f..0000000000 --- a/app/src/main/res/layout/fragment_view_my_qr_code.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - -