From 143b352107d5312a64a6d050b5e57266aad0dca8 Mon Sep 17 00:00:00 2001 From: Pablo Pajuelo Cabezas Date: Wed, 27 Nov 2024 08:02:19 +0100 Subject: [PATCH] remove commented code --- .../dhis2/form/ui/event/UiEventFactoryImpl.kt | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/form/src/main/java/org/dhis2/form/ui/event/UiEventFactoryImpl.kt b/form/src/main/java/org/dhis2/form/ui/event/UiEventFactoryImpl.kt index 9361e18c7dc..f05f27c5aa0 100644 --- a/form/src/main/java/org/dhis2/form/ui/event/UiEventFactoryImpl.kt +++ b/form/src/main/java/org/dhis2/form/ui/event/UiEventFactoryImpl.kt @@ -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,