mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-28 02:37:46 +00:00
feat: add muted forever to ConversationActivityV2.kt
This commit is contained in:
parent
7ef9fb2b28
commit
716dbccb9f
@ -111,23 +111,9 @@ import org.thoughtcrime.securesms.permissions.Permissions
|
||||
import org.thoughtcrime.securesms.util.*
|
||||
import java.util.*
|
||||
import java.util.concurrent.ExecutionException
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.Set
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
import kotlin.collections.filter
|
||||
import kotlin.collections.find
|
||||
import kotlin.collections.first
|
||||
import kotlin.collections.forEach
|
||||
import kotlin.collections.indices
|
||||
import kotlin.collections.isNotEmpty
|
||||
import kotlin.collections.iterator
|
||||
import kotlin.collections.listOf
|
||||
import kotlin.collections.mutableListOf
|
||||
import kotlin.collections.mutableMapOf
|
||||
import kotlin.collections.set
|
||||
import kotlin.collections.sortedBy
|
||||
import kotlin.collections.toTypedArray
|
||||
import kotlin.math.*
|
||||
|
||||
// Some things that seemingly belong to the input bar (e.g. the voice message recording UI) are actually
|
||||
@ -732,7 +718,11 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
muteIconImageView.isVisible = thread.isMuted
|
||||
conversationSubtitleView.isVisible = true
|
||||
if (thread.isMuted) {
|
||||
conversationSubtitleView.text = getString(R.string.ConversationActivity_muted_until_date, DateUtils.getFormattedDateTime(thread.mutedUntil, "EEE, MMM d, yyyy HH:mm", Locale.getDefault()))
|
||||
if (thread.mutedUntil != Long.MAX_VALUE) {
|
||||
conversationSubtitleView.text = getString(R.string.ConversationActivity_muted_until_date, DateUtils.getFormattedDateTime(thread.mutedUntil, "EEE, MMM d, yyyy HH:mm", Locale.getDefault()))
|
||||
} else {
|
||||
conversationSubtitleView.text = getString(R.string.ConversationActivity_muted_forever)
|
||||
}
|
||||
} else if (thread.isGroupRecipient) {
|
||||
val openGroup = DatabaseFactory.getLokiThreadDatabase(this).getOpenGroupChat(threadID)
|
||||
if (openGroup != null) {
|
||||
|
@ -75,6 +75,7 @@
|
||||
<string name="ConversationActivity_message">Message</string>
|
||||
<string name="ConversationActivity_compose">Compose</string>
|
||||
<string name="ConversationActivity_muted_until_date">Muted until %1$s</string>
|
||||
<string name="ConversationActivity_muted_forever">Muted forever</string>
|
||||
<string name="ConversationActivity_member_count">%1$d members</string>
|
||||
<string name="ConversationActivity_open_group_guidelines">Community Guidelines</string>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user