Fixing the remaining tasks

Group notification option was missing
Using the appropriate disappearing message string
Don't show 'uploading' state for quotes/replies
This commit is contained in:
ThomasSession 2024-09-09 10:54:58 +10:00
parent c0bf015049
commit 422b8b246f
3 changed files with 10 additions and 7 deletions

View File

@ -102,14 +102,13 @@ class ConversationActionBarView @JvmOverloads constructor(
if (config?.isEnabled == true) { if (config?.isEnabled == true) {
// Get the type of disappearing message and the abbreviated duration.. // Get the type of disappearing message and the abbreviated duration..
val dmTypeString = when (config.expiryMode) { val dmTypeString = when (config.expiryMode) {
is AfterRead -> context.getString(R.string.read) is AfterRead -> R.string.disappearingMessagesDisappearAfterReadState
else -> context.getString(R.string.send) else -> R.string.disappearingMessagesDisappearAfterSendState
} }
val durationAbbreviated = ExpirationUtil.getExpirationAbbreviatedDisplayValue(config.expiryMode.expirySeconds) val durationAbbreviated = ExpirationUtil.getExpirationAbbreviatedDisplayValue(config.expiryMode.expirySeconds)
// ..then substitute into the string.. // ..then substitute into the string..
val subtitleTxt = context.getSubbedString(R.string.disappearingMessagesDisappear, val subtitleTxt = context.getSubbedString(dmTypeString,
DISAPPEARING_MESSAGES_TYPE_KEY to dmTypeString,
TIME_KEY to durationAbbreviated TIME_KEY to durationAbbreviated
) )

View File

@ -61,6 +61,8 @@ import org.thoughtcrime.securesms.groups.OpenGroupManager
import org.thoughtcrime.securesms.home.UserDetailsBottomSheet import org.thoughtcrime.securesms.home.UserDetailsBottomSheet
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.RequestManager import com.bumptech.glide.RequestManager
import org.session.libsignal.utilities.Log
import org.thoughtcrime.securesms.database.model.MmsMessageRecord
import org.thoughtcrime.securesms.util.DateUtils import org.thoughtcrime.securesms.util.DateUtils
import org.thoughtcrime.securesms.util.disableClipping import org.thoughtcrime.securesms.util.disableClipping
import org.thoughtcrime.securesms.util.toDp import org.thoughtcrime.securesms.util.toDp
@ -391,9 +393,9 @@ class VisibleMessageView : FrameLayout {
context.getColor(R.color.accent_orange), context.getColor(R.color.accent_orange),
R.string.messageStatusFailedToSync R.string.messageStatusFailedToSync
) )
message.isPending -> message.isPending -> {
// Non-mms messages display 'Sending'.. // Non-mms messages (or quote messages, which happen to be mms for some reason) display 'Sending'..
if (!message.isMms) { if (!message.isMms || (message as? MmsMessageRecord)?.quote != null) {
MessageStatusInfo( MessageStatusInfo(
R.drawable.ic_delivery_status_sending, R.drawable.ic_delivery_status_sending,
context.getColorFromAttr(R.attr.message_status_color), context.getColorFromAttr(R.attr.message_status_color),
@ -407,6 +409,7 @@ class VisibleMessageView : FrameLayout {
R.string.uploading R.string.uploading
) )
} }
}
message.isSyncing || message.isResyncing -> message.isSyncing || message.isResyncing ->
MessageStatusInfo( MessageStatusInfo(
R.drawable.ic_delivery_status_sending, R.drawable.ic_delivery_status_sending,

View File

@ -149,6 +149,7 @@
</array> </array>
<string-array name="notify_types"> <string-array name="notify_types">
<item>@string/notificationsAllMessages</item>
<item>@string/notificationsMentionsOnly</item> <item>@string/notificationsMentionsOnly</item>
</string-array> </string-array>