mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Receive calling reactions support and control ux refactor.
Co-authored-by: Nicholas <nicholas@signal.org>
This commit is contained in:
@@ -47,6 +47,14 @@ data class CallParticipant constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun getRecipientDisplayNameDeviceAgnostic(context: Context): String {
|
||||
return if (recipient.isSelf) {
|
||||
context.getString(R.string.CallParticipant__you)
|
||||
} else {
|
||||
recipient.getDisplayName(context)
|
||||
}
|
||||
}
|
||||
|
||||
fun getShortRecipientDisplayName(context: Context): String {
|
||||
return if (recipient.isSelf && isPrimary) {
|
||||
context.getString(R.string.CallParticipant__you)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2023 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.thoughtcrime.securesms.events
|
||||
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* This is a data class to represent a reaction coming in over the wire in the format we need (mapped to a [CallParticipant]) in a way that can be easily
|
||||
* compared across Rx streams.
|
||||
*/
|
||||
data class GroupCallReactionEvent(val sender: CallParticipant, val reaction: String, val timestamp: Long) {
|
||||
fun getExpirationTimestamp(): Long {
|
||||
return timestamp + TimeUnit.SECONDS.toMillis(LIFESPAN_SECONDS)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val LIFESPAN_SECONDS = 4L
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user