mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Upgrade ktlint and add twitter compose rules.
This commit is contained in:
committed by
Greyson Parrelli
parent
52e9b31554
commit
605289aca4
@@ -434,7 +434,7 @@ class MediaSelectionActivity :
|
||||
@JvmStatic
|
||||
fun editor(
|
||||
context: Context,
|
||||
media: List<Media>,
|
||||
media: List<Media>
|
||||
): Intent {
|
||||
return buildIntent(
|
||||
context = context,
|
||||
|
||||
@@ -153,7 +153,9 @@ class MediaSelectionRepository(context: Context) {
|
||||
}.map { media ->
|
||||
Stories.MediaTransform.clipMediaToStoryDuration(media)
|
||||
}.flatten()
|
||||
} else emptyList()
|
||||
} else {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
uploadRepository.applyMediaUpdates(oldToNewMediaMap, singleRecipient)
|
||||
uploadRepository.updateCaptions(updatedMedia)
|
||||
|
||||
@@ -34,7 +34,8 @@ class MediaGalleryViewModel(bucketId: String?, bucketTitle: String?, private val
|
||||
repository.getFolders { folders ->
|
||||
store.update { state ->
|
||||
state.copy(
|
||||
bucketId = bucketId, bucketTitle = bucketTitle,
|
||||
bucketId = bucketId,
|
||||
bucketTitle = bucketTitle,
|
||||
items = folders.map {
|
||||
MediaGallerySelectableItem.FolderModel(it)
|
||||
}
|
||||
@@ -45,7 +46,8 @@ class MediaGalleryViewModel(bucketId: String?, bucketTitle: String?, private val
|
||||
repository.getMedia(bucketId) { media ->
|
||||
store.update { state ->
|
||||
state.copy(
|
||||
bucketId = bucketId, bucketTitle = bucketTitle,
|
||||
bucketId = bucketId,
|
||||
bucketTitle = bucketTitle,
|
||||
items = media.map {
|
||||
MediaGallerySelectableItem.FileModel(it, false, 0)
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ class AddMessageDialogFragment : KeyboardEntryDialogFragment(R.layout.v2_media_a
|
||||
if (!recipient.isPushV2Group) {
|
||||
annotations
|
||||
} else {
|
||||
|
||||
val validRecipientIds: Set<String> = recipient.participantIds
|
||||
.map { id -> MentionAnnotation.idToMentionAnnotationValue(id) }
|
||||
.toSet()
|
||||
|
||||
@@ -85,7 +85,7 @@ class MediaReviewFragment : Fragment(R.layout.v2_media_review_fragment), Schedul
|
||||
private lateinit var progressWrapper: TouchInterceptingFrameLayout
|
||||
|
||||
private val navigator = MediaSelectionNavigator(
|
||||
toGallery = R.id.action_mediaReviewFragment_to_mediaGalleryFragment,
|
||||
toGallery = R.id.action_mediaReviewFragment_to_mediaGalleryFragment
|
||||
)
|
||||
|
||||
private var animatorSet: AnimatorSet? = null
|
||||
@@ -502,24 +502,22 @@ class MediaReviewFragment : Fragment(R.layout.v2_media_review_fragment), Schedul
|
||||
}
|
||||
|
||||
private fun computeSendButtonAnimators(state: MediaSelectionState): List<Animator> {
|
||||
|
||||
val slideIn = listOf(
|
||||
MediaReviewAnimatorController.getSlideInAnimator(sendButton),
|
||||
MediaReviewAnimatorController.getSlideInAnimator(sendButton)
|
||||
)
|
||||
|
||||
return slideIn + if (state.isTouchEnabled) {
|
||||
listOf(
|
||||
MediaReviewAnimatorController.getFadeInAnimator(sendButton, state.canSend),
|
||||
MediaReviewAnimatorController.getFadeInAnimator(sendButton, state.canSend)
|
||||
)
|
||||
} else {
|
||||
listOf(
|
||||
MediaReviewAnimatorController.getFadeOutAnimator(sendButton, state.canSend),
|
||||
MediaReviewAnimatorController.getFadeOutAnimator(sendButton, state.canSend)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun computeSaveButtonAnimators(state: MediaSelectionState): List<Animator> {
|
||||
|
||||
val slideIn = listOf(
|
||||
MediaReviewAnimatorController.getSlideInAnimator(saveButton)
|
||||
)
|
||||
|
||||
@@ -24,7 +24,8 @@ class ChooseStoryTypeBottomSheet : DSLSettingsBottomSheetFragment(
|
||||
textPref(
|
||||
title = DSLSettingsText.from(
|
||||
stringId = R.string.ChooseStoryTypeBottomSheet__choose_your_story_type,
|
||||
DSLSettingsText.CenterModifier, DSLSettingsText.TitleMediumModifier
|
||||
DSLSettingsText.CenterModifier,
|
||||
DSLSettingsText.TitleMediumModifier
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -29,10 +29,16 @@ object TextStoryBackgroundColors {
|
||||
id = ChatColors.Id.NotSet,
|
||||
linearGradient = ChatColors.LinearGradient(
|
||||
colors = intArrayOf(
|
||||
0xFF19A9FA.toInt(), 0xFF7097D7.toInt(), 0xFFD1998D.toInt(), 0xFFFFC369.toInt()
|
||||
0xFF19A9FA.toInt(),
|
||||
0xFF7097D7.toInt(),
|
||||
0xFFD1998D.toInt(),
|
||||
0xFFFFC369.toInt()
|
||||
),
|
||||
positions = floatArrayOf(
|
||||
0f, 0.33f, 0.66f, 1f
|
||||
0f,
|
||||
0.33f,
|
||||
0.66f,
|
||||
1f
|
||||
),
|
||||
degrees = 180f
|
||||
)
|
||||
@@ -41,10 +47,16 @@ object TextStoryBackgroundColors {
|
||||
id = ChatColors.Id.NotSet,
|
||||
linearGradient = ChatColors.LinearGradient(
|
||||
colors = intArrayOf(
|
||||
0xFF4437D8.toInt(), 0xFF6B70DE.toInt(), 0xFFB774E0.toInt(), 0xFFFF8E8E.toInt()
|
||||
0xFF4437D8.toInt(),
|
||||
0xFF6B70DE.toInt(),
|
||||
0xFFB774E0.toInt(),
|
||||
0xFFFF8E8E.toInt()
|
||||
),
|
||||
positions = floatArrayOf(
|
||||
0f, 0.33f, 0.66f, 1f
|
||||
0f,
|
||||
0.33f,
|
||||
0.66f,
|
||||
1f
|
||||
),
|
||||
degrees = 180f
|
||||
)
|
||||
@@ -53,10 +65,16 @@ object TextStoryBackgroundColors {
|
||||
id = ChatColors.Id.NotSet,
|
||||
linearGradient = ChatColors.LinearGradient(
|
||||
colors = intArrayOf(
|
||||
0xFF004044.toInt(), 0xFF2C5F45.toInt(), 0xFF648E52.toInt(), 0xFF93B864.toInt()
|
||||
0xFF004044.toInt(),
|
||||
0xFF2C5F45.toInt(),
|
||||
0xFF648E52.toInt(),
|
||||
0xFF93B864.toInt()
|
||||
),
|
||||
positions = floatArrayOf(
|
||||
0f, 0.33f, 0.66f, 1f
|
||||
0f,
|
||||
0.33f,
|
||||
0.66f,
|
||||
1f
|
||||
),
|
||||
degrees = 180f
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ data class TextStoryPostCreationState(
|
||||
val textFont: TextFont = TextFont.REGULAR,
|
||||
@IntRange(from = 0, to = 100) val textScale: Int = 50,
|
||||
val backgroundColor: ChatColors = TextStoryBackgroundColors.getInitialBackgroundColor(),
|
||||
val linkPreviewUri: String? = null,
|
||||
val linkPreviewUri: String? = null
|
||||
) : Parcelable {
|
||||
|
||||
@ColorInt
|
||||
|
||||
Reference in New Issue
Block a user