Closes #2528 - Fixes Dialog navigation
parent
6942767dfe
commit
855acd5fe2
|
@ -18,6 +18,7 @@ import android.widget.LinearLayout
|
|||
import androidx.appcompat.app.AppCompatDialogFragment
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.navigation.fragment.NavHostFragment.findNavController
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -37,7 +38,6 @@ import org.mozilla.fenix.mvi.ActionBusFactory
|
|||
import org.mozilla.fenix.mvi.getAutoDisposeObservable
|
||||
import org.mozilla.fenix.mvi.getManagedEmitter
|
||||
import org.mozilla.fenix.settings.PhoneFeature
|
||||
import org.mozilla.fenix.utils.ItsNotBrokenSnack
|
||||
import java.net.MalformedURLException
|
||||
import java.net.URL
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
@ -179,10 +179,10 @@ class QuickSettingsSheetDialogFragment : AppCompatDialogFragment(), CoroutineSco
|
|||
requestPermissions(it.permissions, REQUEST_CODE_QUICK_SETTINGS_PERMISSIONS)
|
||||
}
|
||||
is QuickSettingsAction.SelectTrackingProtectionSettings -> {
|
||||
context?.let {
|
||||
ItsNotBrokenSnack(it).showSnackbar("2422")
|
||||
}
|
||||
dismiss()
|
||||
val directions =
|
||||
QuickSettingsSheetDialogFragmentDirections
|
||||
.actionQuickSettingsSheetDialogFragmentToTrackingProtectionFragment()
|
||||
findNavController(this@QuickSettingsSheetDialogFragment).navigate(directions)
|
||||
}
|
||||
is QuickSettingsAction.SelectReportProblem -> {
|
||||
launch(Dispatchers.Main) {
|
||||
|
|
|
@ -300,7 +300,7 @@
|
|||
<fragment
|
||||
android:id="@+id/turnOnSyncFragment"
|
||||
android:name="org.mozilla.fenix.settings.TurnOnSyncFragment"
|
||||
android:label="TurnOnSyncFragment">
|
||||
android:label="@string/preferences_sync">
|
||||
<action
|
||||
android:id="@+id/action_turnOnSyncFragment_to_browserFragment"
|
||||
app:destination="@id/browserFragment"
|
||||
|
@ -311,14 +311,16 @@
|
|||
app:destination="@id/pairInstructionsFragment" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
<dialog
|
||||
android:id="@+id/pairInstructionsFragment"
|
||||
android:name="org.mozilla.fenix.settings.PairInstructionsFragment"
|
||||
android:label="PairInstructionsFragment">
|
||||
<action
|
||||
android:id="@+id/action_pairInstructionsFragment_to_pairFragment"
|
||||
app:destination="@id/pairFragment" />
|
||||
</fragment>
|
||||
app:destination="@id/pairFragment"
|
||||
app:popUpTo="@+id/pairInstructionsFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
</dialog>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/pairFragment"
|
||||
|
@ -393,6 +395,8 @@
|
|||
app:argType="integer" />
|
||||
<action
|
||||
android:id="@+id/action_quickSettingsSheetDialogFragment_to_trackingProtectionFragment"
|
||||
app:destination="@id/trackingProtectionFragment" />
|
||||
app:destination="@id/trackingProtectionFragment"
|
||||
app:popUpTo="@id/quickSettingsSheetDialogFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
</dialog>
|
||||
</navigation>
|
Loading…
Reference in New Issue