mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 03:11:10 +01:00
Upgrade ktlint and add twitter compose rules.
This commit is contained in:
committed by
Greyson Parrelli
parent
52e9b31554
commit
605289aca4
@@ -29,7 +29,7 @@ class MediaPreviewV2Adapter(fragment: Fragment) : FragmentStateAdapter(fragment)
|
||||
MediaPreviewFragment.DATA_CONTENT_TYPE to contentType,
|
||||
MediaPreviewFragment.DATA_SIZE to attachment.size,
|
||||
MediaPreviewFragment.AUTO_PLAY to attachment.isVideoGif,
|
||||
MediaPreviewFragment.VIDEO_GIF to attachment.isVideoGif,
|
||||
MediaPreviewFragment.VIDEO_GIF to attachment.isVideoGif
|
||||
)
|
||||
val fragment = if (MediaUtil.isVideo(contentType)) {
|
||||
VideoMediaPreviewFragment()
|
||||
|
||||
@@ -12,7 +12,7 @@ data class MediaPreviewV2State(
|
||||
val allMediaInAlbumRail: Boolean = false,
|
||||
val leftIsRecent: Boolean = false,
|
||||
val albums: Map<Long, List<Media>> = mapOf(),
|
||||
val messageBodies: Map<Long, SpannableString> = mapOf(),
|
||||
val messageBodies: Map<Long, SpannableString> = mapOf()
|
||||
) {
|
||||
enum class LoadState { INIT, DATA_LOADED, MEDIA_READY }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class MediaPreviewV2ViewModel : ViewModel() {
|
||||
mediaRecords = result.records,
|
||||
messageBodies = result.messageBodies,
|
||||
albums = albums,
|
||||
loadState = MediaPreviewV2State.LoadState.DATA_LOADED,
|
||||
loadState = MediaPreviewV2State.LoadState.DATA_LOADED
|
||||
)
|
||||
} else {
|
||||
oldState.copy(
|
||||
@@ -52,7 +52,7 @@ class MediaPreviewV2ViewModel : ViewModel() {
|
||||
mediaRecords = result.records.reversed(),
|
||||
messageBodies = result.messageBodies,
|
||||
albums = albums.mapValues { it.value.reversed() },
|
||||
loadState = MediaPreviewV2State.LoadState.DATA_LOADED,
|
||||
loadState = MediaPreviewV2State.LoadState.DATA_LOADED
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
class ExpandingCaptionView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0,
|
||||
defStyleAttr: Int = 0
|
||||
) : EmojiTextView(context, attrs, defStyleAttr) {
|
||||
|
||||
var expandedHeight = 0
|
||||
|
||||
Reference in New Issue
Block a user