mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Send reactions.
This commit is contained in:
@@ -47,14 +47,6 @@ 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)
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
|
||||
package org.thoughtcrime.securesms.events
|
||||
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
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
|
||||
* This is a data class to represent a reaction coming in over the wire in the format we need (mapped to a [Recipient]) in a way that can be easily
|
||||
* compared across Rx streams.
|
||||
*/
|
||||
data class GroupCallReactionEvent(val sender: CallParticipant, val reaction: String, val timestamp: Long) {
|
||||
data class GroupCallReactionEvent(val sender: Recipient, val reaction: String, val timestamp: Long) {
|
||||
fun getExpirationTimestamp(): Long {
|
||||
return timestamp + TimeUnit.SECONDS.toMillis(LIFESPAN_SECONDS)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user