Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Balcan committed Nov 27, 2024
1 parent 0d69ec1 commit 143b352
Showing 1 changed file with 0 additions and 88 deletions.
88 changes: 0 additions & 88 deletions form/src/main/java/org/dhis2/form/ui/event/UiEventFactoryImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,103 +30,15 @@ class UiEventFactoryImpl(
var uiEvent: RecyclerViewUiEvents? = null
try {
uiEvent = when (uiEventType) {
/*DATE_TIME -> {
when (valueType) {
ValueType.DATE -> RecyclerViewUiEvents.OpenCustomCalendar(
uid,
label,
value?.let { DateUtils.oldUiDateFormat().parse(it) },
allowFutureDates ?: true,
)
ValueType.DATETIME -> RecyclerViewUiEvents.OpenCustomCalendar(
uid,
label,
value?.let { DateUtils.databaseDateFormatNoSeconds().parse(it) },
allowFutureDates ?: true,
isDateTime = true,
)
ValueType.TIME -> RecyclerViewUiEvents.OpenTimePicker(
uid,
label,
value?.let { DateUtils.timeFormat().parse(it) },
)
else -> null
}
}*/

/*AGE_CALENDAR -> RecyclerViewUiEvents.OpenCustomCalendar(
uid = uid,
label = label,
date = value?.toDate(),
allowFutureDates = allowFutureDates ?: false,
)*/

/*ORG_UNIT -> RecyclerViewUiEvents.OpenOrgUnitDialog(
uid,
label,
value,
fieldUiModel.orgUnitSelectorScope,
)*/

/*REQUEST_CURRENT_LOCATION -> RecyclerViewUiEvents.RequestCurrentLocation(
uid = uid,
)*/

REQUEST_LOCATION_BY_MAP -> RecyclerViewUiEvents.RequestLocationByMap(
uid = uid,
featureType = getFeatureType(renderingType),
value = value,
)

/*SHOW_DESCRIPTION -> RecyclerViewUiEvents.ShowDescriptionLabelDialog(
title = label,
message = description,
)*/

ADD_PICTURE -> RecyclerViewUiEvents.AddImage(uid)
/*SHOW_PICTURE -> RecyclerViewUiEvents.ShowImage(
label,
value ?: "",
)
COPY_TO_CLIPBOARD -> RecyclerViewUiEvents.CopyToClipboard(
value = value,
)
QR_CODE -> {
if (value.isNullOrEmpty() && fieldUiModel.editable) {
RecyclerViewUiEvents.ScanQRCode(
uid = uid,
optionSet = optionSet,
renderingType = renderingType,
)
} else if (value != null) {
RecyclerViewUiEvents.DisplayQRCode(
uid = uid,
optionSet = optionSet,
value = value,
renderingType = renderingType,
editable = fieldUiModel.editable,
label = label,
)
} else {
null
}
}
ADD_SIGNATURE -> RecyclerViewUiEvents.AddSignature(uid, label)*/
ADD_FILE -> RecyclerViewUiEvents.OpenFileSelector(fieldUiModel)
OPEN_FILE -> RecyclerViewUiEvents.OpenFile(fieldUiModel)
/*EMAIL -> RecyclerViewUiEvents.OpenChooserIntent(Intent.ACTION_SENDTO, value, uid)
PHONE_NUMBER -> RecyclerViewUiEvents.OpenChooserIntent(
Intent.ACTION_DIAL,
value,
uid,
)*/

SHARE_IMAGE -> RecyclerViewUiEvents.OpenChooserIntent(
Intent.ACTION_SEND,
fieldUiModel.displayName,
Expand Down

0 comments on commit 143b352

Please sign in to comment.