Skip to content

Commit

Permalink
refactor: [ANDROAPP-6170] Remove OpenYearMonthDayAgeCalendar UiEventType
Browse files Browse the repository at this point in the history
Signed-off-by: andresmr <[email protected]>
  • Loading branch information
andresmr committed May 28, 2024
1 parent 69dffbb commit 9d1701b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import org.dhis2.ui.dialogs.bottomsheet.BottomSheetDialogUiModel
import org.dhis2.ui.dialogs.bottomsheet.DialogButtonStyle.DiscardButton
import org.dhis2.ui.dialogs.bottomsheet.DialogButtonStyle.MainButton
import org.dhis2.usescases.eventsWithoutRegistration.eventCapture.eventCaptureFragment.EventCaptureFormFragment
import org.dhis2.usescases.eventsWithoutRegistration.eventCapture.eventCaptureFragment.OnEditionListener
import org.dhis2.usescases.eventsWithoutRegistration.eventCapture.model.EventCompletionDialog
import org.dhis2.usescases.eventsWithoutRegistration.eventDetails.injection.EventDetailsComponent
import org.dhis2.usescases.eventsWithoutRegistration.eventDetails.injection.EventDetailsComponentProvider
Expand Down Expand Up @@ -90,7 +89,6 @@ class EventCaptureActivity :
private var teiUid: String? = null
private var enrollmentUid: String? = null
private val relationshipMapButton: LiveData<Boolean> = MutableLiveData(false)
private var onEditionListener: OnEditionListener? = null
private var adapter: EventCapturePagerAdapter? = null
private var eventViewPager: ViewPager2? = null
private var dashboardViewModel: DashboardViewModel? = null
Expand Down Expand Up @@ -243,9 +241,6 @@ class EventCaptureActivity :

@Deprecated("Deprecated in Java")
override fun onBackPressed() {
if (onEditionListener != null) {
onEditionListener!!.onEditionListener()
}
finishEditMode()
}

Expand Down Expand Up @@ -505,10 +500,6 @@ class EventCaptureActivity :
// there are no relationships on events
}

fun setFormEditionListener(onEditionListener: OnEditionListener?) {
this.onEditionListener = onEditionListener
}

override fun provideEventDetailsComponent(module: EventDetailsModule?): EventDetailsComponent? {
return eventCaptureComponent!!.plus(module)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@

import kotlin.Unit;

public class EventCaptureFormFragment extends FragmentGlobalAbstract implements EventCaptureFormView,
OnEditionListener {
public class EventCaptureFormFragment extends FragmentGlobalAbstract implements EventCaptureFormView {

@Inject
EventCaptureFormPresenter presenter;
Expand Down Expand Up @@ -102,7 +101,6 @@ public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedI
.setRecords(new EventRecords(eventUid, eventMode))
.openErrorLocation(getArguments().getBoolean(OPEN_ERROR_LOCATION, false))
.build();
activity.setFormEditionListener(this);
super.onCreate(savedInstanceState);
}

Expand Down Expand Up @@ -163,11 +161,6 @@ public void performSaveClick() {
formView.onSaveClick();
}

@Override
public void onEditionListener() {

}

@Override
public void hideSaveButton() {
binding.actionButton.setVisibility(View.GONE);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FormSectionMapper {
null -> SectionState.FIXED
},
fields = fields,
warningMessage = if (item.isOpen != false && fields.isEmpty()) {
warningMessage = if (fields.isEmpty()) {
R.string.form_without_fields
} else {
null
Expand Down

0 comments on commit 9d1701b

Please sign in to comment.