TP-31291 | member selection bug fix (#6757)
* TP-31291 | member selection bug fix
This commit is contained in:
committed by
GitHub Enterprise
parent
59a91c5695
commit
d04bcc88fb
@@ -245,9 +245,7 @@ class MultiSelectWidgetView(context: Context, attributeSet: AttributeSet? = null
|
||||
}
|
||||
}
|
||||
itemViewBinding.dropDown.setOnClickListener {
|
||||
if (optionItem.rightSideContent?.data is DropDownData && optionItem.rightSideContent.data.ctaData != null) {
|
||||
callback?.invoke(optionItem.rightSideContent.data.ctaData)
|
||||
} else if (!optionNames.isNullOrEmpty() || optionNames.size < 2) {
|
||||
if (!optionNames.isNullOrEmpty() || optionNames.size < 2) {
|
||||
val dialogViewBinding =
|
||||
DataBindingUtil.inflate<CustomGenderDialogBinding>(
|
||||
LayoutInflater.from(context),
|
||||
@@ -270,7 +268,11 @@ class MultiSelectWidgetView(context: Context, attributeSet: AttributeSet? = null
|
||||
alertDialog.window?.run {
|
||||
this.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
}
|
||||
alertDialog.show()
|
||||
if (optionItem.rightSideContent?.data is DropDownData && optionItem.rightSideContent.data.ctaData != null) {
|
||||
callback?.invoke(optionItem.rightSideContent.data.ctaData)
|
||||
} else {
|
||||
alertDialog.show()
|
||||
}
|
||||
dialogViewBinding.radioGroup.setOnCheckedChangeListener { _, checkedId ->
|
||||
val tag =
|
||||
if (checkedId == R.id.checkbox_item_one) optionNames[0]
|
||||
|
||||
@@ -41,8 +41,13 @@ class HrsDatePickerView @JvmOverloads constructor(
|
||||
it.maxDate?.let { maxDate -> binding.datePicker.maxDate = maxDate }
|
||||
}
|
||||
val calendar = Calendar.getInstance()
|
||||
dateChangeListener?.onDateChanged(
|
||||
calendar.get(Calendar.YEAR) - YEAR_CORRECTION_VALUE,
|
||||
calendar.get(Calendar.MONTH) + 1,
|
||||
calendar.get(Calendar.DAY_OF_MONTH)
|
||||
)
|
||||
binding.datePicker.init(
|
||||
calendar.get(Calendar.YEAR) - 23,
|
||||
calendar.get(Calendar.YEAR) - YEAR_CORRECTION_VALUE,
|
||||
calendar.get(Calendar.MONTH),
|
||||
calendar.get(Calendar.DAY_OF_MONTH)
|
||||
) { view, year, monthOfYear, dayOfMonth ->
|
||||
@@ -69,4 +74,7 @@ class HrsDatePickerView @JvmOverloads constructor(
|
||||
dayOfMonth: Int
|
||||
)
|
||||
}
|
||||
companion object {
|
||||
private const val YEAR_CORRECTION_VALUE = 23
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user