Skip to content

Commit

Permalink
fix code smells
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
Balcan committed Feb 9, 2024
1 parent 88e2ee3 commit 01902f7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class DashboardViewModel(
_state.value =
model.currentEnrollment.aggregatedSyncState()
}
} catch (_: Exception) {
} catch (e: Exception) {
Timber.e(e)
}
}
}
Expand All @@ -81,7 +82,8 @@ class DashboardViewModel(
}
try {
_groupByStage.value = result.await()
} catch (_: Exception) {
} catch (e: Exception) {
Timber.e(e)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class TeiDashboardMobileActivity :
}
}
val enrollmentStatus =
dashboardModel.currentEnrollment != null && dashboardModel.currentEnrollment.status() == EnrollmentStatus.ACTIVE
dashboardModel.currentEnrollment.status() == EnrollmentStatus.ACTIVE
if (intent.getStringExtra(Constants.EVENT_UID) != null && enrollmentStatus) {
dashboardViewModel.updateEventUid(
intent.getStringExtra(Constants.EVENT_UID),
Expand Down Expand Up @@ -626,7 +626,9 @@ class TeiDashboardMobileActivity :
StatusChangeResultCode.FAILED -> displayMessage(getString(R.string.something_wrong))
StatusChangeResultCode.ACTIVE_EXIST -> displayMessage(getString(R.string.status_change_error_active_exist))
StatusChangeResultCode.WRITE_PERMISSION_FAIL -> displayMessage(getString(R.string.permission_denied))
StatusChangeResultCode.CHANGED -> {}
StatusChangeResultCode.CHANGED -> {
/*No message needed to be displayed*/
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class TeiDashboardPresenter implements TeiDashboardContracts.Presenter {
private final PreferenceProvider preferenceProvider;
private final TeiDashboardContracts.View view;

private String teiUid;
public String programUid;

public CompositeDisposable compositeDisposable;
Expand All @@ -45,7 +44,6 @@ public TeiDashboardPresenter(
MatomoAnalyticsController matomoAnalyticsController
) {
this.view = view;
this.teiUid = teiUid;
this.programUid = programUid;
this.analyticsHelper = analyticsHelper;
this.dashboardRepository = dashboardRepository;
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/res/layout-land/fragment_tei_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@

</androidx.core.widget.NestedScrollView>

<!--<org.dhis2.utils.dialFloatingActionButton.DialFloatingActionButtonLayout
android:id="@+id/dialFabLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:fab_extra_bottom_margin="@{52}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
-->
</androidx.constraintlayout.widget.ConstraintLayout>

</layout>
8 changes: 0 additions & 8 deletions app/src/main/res/layout/fragment_tei_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@

</androidx.core.widget.NestedScrollView>

<!--<org.dhis2.utils.dialFloatingActionButton.DialFloatingActionButtonLayout
android:id="@+id/dialFabLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:fab_extra_bottom_margin="@{16}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />-->

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>

0 comments on commit 01902f7

Please sign in to comment.