mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Add support for replying to gift badges.
This commit is contained in:
@@ -9,6 +9,7 @@ import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||
import org.thoughtcrime.securesms.database.model.MmsMessageRecord
|
||||
import org.thoughtcrime.securesms.database.model.databaseprotos.GiftBadge
|
||||
import org.thoughtcrime.securesms.mms.QuoteModel
|
||||
import org.thoughtcrime.securesms.mms.TextSlide
|
||||
import org.thoughtcrime.securesms.stickers.StickerUrl
|
||||
|
||||
@@ -127,3 +128,10 @@ fun MessageRecord.isTextOnly(context: Context): Boolean {
|
||||
!hasGiftBadge()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the QuoteType for this record, as if it was being quoted.
|
||||
*/
|
||||
fun MessageRecord.getRecordQuoteType(): QuoteModel.Type {
|
||||
return if (hasGiftBadge()) QuoteModel.Type.GIFT_BADGE else QuoteModel.Type.NORMAL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user