diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/list/TraceLocationsFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/list/TraceLocationsFragment.kt index 14f6f3e68ed..049217caeff 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/list/TraceLocationsFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/list/TraceLocationsFragment.kt @@ -3,7 +3,6 @@ package de.rki.coronawarnapp.ui.eventregistration.organizer.list import android.os.Bundle import android.view.View import android.view.accessibility.AccessibilityEvent -import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.appcompat.widget.Toolbar import androidx.core.view.isGone @@ -108,7 +107,9 @@ class TraceLocationsFragment : Fragment(R.layout.trace_location_organizer_trace_ setOnMenuItemClickListener { when (it.itemId) { R.id.menu_information -> { - Toast.makeText(requireContext(), "Information // TODO", Toast.LENGTH_SHORT).show() + findNavController().navigate( + R.id.action_traceLocationOrganizerListFragment_to_traceLocationOrganizerQRInfoFragment + ) true } R.id.menu_remove_all -> { diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt index a89c82c787a..1474fe53afc 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/eventregistration/organizer/qrinfo/TraceLocationQRInfoFragment.kt @@ -38,14 +38,24 @@ class TraceLocationQRInfoFragment : Fragment(R.layout.trace_location_organizer_q when (it) { is TraceLocationQRInfoNavigationEvents.NavigateToDataPrivacy -> findNavController().navigate("coronawarnapp://contactdiary/dataPrivacy".toUri()) + is TraceLocationQRInfoNavigationEvents.NavigateToMyQrCodes -> { - settings.qrInfoAcknowledged = true - doNavigate( - TraceLocationQRInfoFragmentDirections - .actionTraceLocationOrganizerQRInfoFragmentToTraceLocationOrganizerListFragment() - ) + + if (isAlreadyOnboarded()) { + popBackStack() + } else { + settings.qrInfoAcknowledged = true + doNavigate( + TraceLocationQRInfoFragmentDirections + .actionTraceLocationOrganizerQRInfoFragmentToTraceLocationOrganizerListFragment() + ) + } } } } } + + private fun isAlreadyOnboarded(): Boolean { + return settings.qrInfoAcknowledged + } } diff --git a/Corona-Warn-App/src/main/res/navigation/trace_location_organizer_nav_graph.xml b/Corona-Warn-App/src/main/res/navigation/trace_location_organizer_nav_graph.xml index 85aad7f2265..b239cd886db 100644 --- a/Corona-Warn-App/src/main/res/navigation/trace_location_organizer_nav_graph.xml +++ b/Corona-Warn-App/src/main/res/navigation/trace_location_organizer_nav_graph.xml @@ -58,6 +58,9 @@ + \ No newline at end of file