Fix flow colors.
This commit is contained in:
parent
3dd31432c8
commit
5c77c33dff
3 changed files with 8 additions and 17 deletions
|
@ -19,6 +19,11 @@ data class ViewColorSet(
|
||||||
val background: ViewColor
|
val background: ViewColor
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
companion object {
|
companion object {
|
||||||
|
val PRIMARY = ViewColorSet(
|
||||||
|
foreground = ViewColor.ColorResource(R.color.signal_colorOnPrimary),
|
||||||
|
background = ViewColor.ColorResource(R.color.signal_colorPrimary)
|
||||||
|
)
|
||||||
|
|
||||||
fun forCustomColor(@ColorInt customColor: Int): ViewColorSet {
|
fun forCustomColor(@ColorInt customColor: Int): ViewColorSet {
|
||||||
return ViewColorSet(
|
return ViewColorSet(
|
||||||
foreground = ViewColor.ColorResource(R.color.signal_colorOnCustom),
|
foreground = ViewColor.ColorResource(R.color.signal_colorOnCustom),
|
||||||
|
|
|
@ -35,21 +35,7 @@ open class MultiselectForwardActivity : FragmentWrapperActivity(), MultiselectFo
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getFragment(): Fragment {
|
override fun getFragment(): Fragment {
|
||||||
return MultiselectForwardFragment.create(
|
return MultiselectForwardFragment.create(args)
|
||||||
args.let {
|
|
||||||
if (it.sendButtonColors == null) {
|
|
||||||
args.withSendButtonTint(ContextCompat.getColor(this, R.color.signal_colorPrimary))
|
|
||||||
args.copy(
|
|
||||||
sendButtonColors = ViewColorSet(
|
|
||||||
foreground = ViewColorSet.ViewColor.ColorResource(R.color.signal_colorOnPrimary),
|
|
||||||
background = ViewColorSet.ViewColor.ColorResource(R.color.signal_colorPrimary)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
args
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFinishForwardAction() {
|
override fun onFinishForwardAction() {
|
||||||
|
|
|
@ -44,7 +44,7 @@ data class MultiselectForwardFragmentArgs @JvmOverloads constructor(
|
||||||
val forceDisableAddMessage: Boolean = false,
|
val forceDisableAddMessage: Boolean = false,
|
||||||
val forceSelectionOnly: Boolean = false,
|
val forceSelectionOnly: Boolean = false,
|
||||||
val selectSingleRecipient: Boolean = false,
|
val selectSingleRecipient: Boolean = false,
|
||||||
val sendButtonColors: ViewColorSet? = null,
|
val sendButtonColors: ViewColorSet = ViewColorSet.PRIMARY,
|
||||||
val storySendRequirements: Stories.MediaTransform.SendRequirements = Stories.MediaTransform.SendRequirements.CAN_NOT_SEND,
|
val storySendRequirements: Stories.MediaTransform.SendRequirements = Stories.MediaTransform.SendRequirements.CAN_NOT_SEND,
|
||||||
val isSearchEnabled: Boolean = true
|
val isSearchEnabled: Boolean = true
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
|
@ -74,7 +74,7 @@ data class MultiselectForwardFragmentArgs @JvmOverloads constructor(
|
||||||
isMmsSupported,
|
isMmsSupported,
|
||||||
listOf(multiShareArgs),
|
listOf(multiShareArgs),
|
||||||
storySendRequirements = Stories.MediaTransform.SendRequirements.CAN_NOT_SEND,
|
storySendRequirements = Stories.MediaTransform.SendRequirements.CAN_NOT_SEND,
|
||||||
sendButtonColors = sendButtonColors
|
sendButtonColors = sendButtonColors ?: ViewColorSet.PRIMARY
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue