Skip to content

Commit

Permalink
fix landscape support
Browse files Browse the repository at this point in the history
Signed-off-by: andresmr <[email protected]>
  • Loading branch information
andresmr committed Apr 30, 2024
1 parent 5c7ee54 commit ba8863f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class EventCaptureActivity :
eventUid = intent.getStringExtra(Constants.EVENT_UID)
programUid = intent.getStringExtra(Constants.PROGRAM_UID)
setUpEventCaptureComponent(eventUid)
teiUid = presenter!!.teiUid
enrollmentUid = presenter!!.enrollmentUid
teiUid = presenter.getTeiUid()
enrollmentUid = presenter.getEnrollmentUid()
themeManager!!.setProgramTheme(intent.getStringExtra(Constants.PROGRAM_UID)!!)
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this, R.layout.activity_event_capture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class EventCaptureContract {
fun getCompletionPercentageVisibility(): Boolean
fun emitAction(onBack: EventCaptureAction)
fun programStage(): String
fun getTeiUid(): String?
fun getEnrollmentUid(): String?
}

interface EventCaptureRepository {
Expand All @@ -85,5 +87,7 @@ class EventCaptureContract {
fun hasAnalytics(): Boolean
fun hasRelationships(): Boolean
fun validationStrategy(): ValidationStrategy
fun getTeiUid(): String?
fun getEnrollmentUid(): String?
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ class EventCapturePresenterImpl(
override fun programStage(): String = eventCaptureRepository.programStage().blockingFirst()

override fun getEnrollmentUid(): String? {
return eventCaptureRepository.enrollmentUid
return eventCaptureRepository.getEnrollmentUid()
}
override fun getTeiUid(): String? {
return eventCaptureRepository.teiUid
return eventCaptureRepository.getTeiUid()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ class TEIDataPresenter(
.subscribe(
{ events ->
_events.postValue(events)
_totalTimeLineEvents.postValue(
events.firstOrNull()?.eventCount
?: 0,
)
decrement()
},
Timber.Forest::d,
Expand Down

0 comments on commit ba8863f

Please sign in to comment.