mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Show the full reply chain in the 'see replies' bottom sheet.
This commit is contained in:
@@ -8,6 +8,7 @@ import org.thoughtcrime.securesms.database.MmsSmsColumns
|
||||
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.Quote
|
||||
import org.thoughtcrime.securesms.database.model.databaseprotos.GiftBadge
|
||||
import org.thoughtcrime.securesms.mms.QuoteModel
|
||||
import org.thoughtcrime.securesms.mms.TextSlide
|
||||
@@ -78,6 +79,13 @@ fun MessageRecord.hasExtraText(): Boolean {
|
||||
fun MessageRecord.hasQuote(): Boolean =
|
||||
isMms && (this as MmsMessageRecord).quote != null
|
||||
|
||||
fun MessageRecord.getQuote(): Quote? =
|
||||
if (isMms) {
|
||||
(this as MmsMessageRecord).quote
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
fun MessageRecord.hasLinkPreview(): Boolean =
|
||||
isMms && (this as MmsMessageRecord).linkPreviews.isNotEmpty()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user