Skip to content

Commit

Permalink
Merge pull request #2096 from Infomaniak/change-account-crash
Browse files Browse the repository at this point in the history
fix: `Change account` button in `NoValidMailbox` fragment was crashing because `SwitchUser` fragment doesn't exist anymore
  • Loading branch information
KevinBoulongne authored Nov 7, 2024
2 parents 1b2e981 + aae7bf4 commit 1470ccd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class NoValidMailboxesFragment : Fragment(), MailboxListFragment {

changeAccountButton.setOnClickListener {
trackNoValidMailboxesEvent("switchAccount")
safeNavigate(NoValidMailboxesFragmentDirections.actionNoValidMailboxesFragmentToSwitchUserFragment())
safeNavigate(resId = R.id.accountBottomSheetDialog)
}

attachNewMailboxButton.setOnClickListener {
Expand Down
15 changes: 6 additions & 9 deletions app/src/main/res/navigation/no_valid_mailboxes_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
android:name="com.infomaniak.mail.ui.noValidMailboxes.NoValidMailboxesFragment"
android:label="NoValidMailboxesFragment"
tools:layout="@layout/fragment_no_valid_mailboxes">
<action
android:id="@+id/action_noValidMailboxesFragment_to_switchUserFragment"
app:destination="@id/switchUserFragment" />
<action
android:id="@+id/action_noValidMailboxesFragment_to_attachMailboxFragment"
app:destination="@id/attachMailboxFragment" />
Expand All @@ -37,12 +34,6 @@
app:destination="@id/invalidPasswordFragment" />
</fragment>

<fragment
android:id="@+id/switchUserFragment"
android:name="com.infomaniak.mail.ui.main.user.SwitchUserFragment"
android:label="SwitchUserFragment"
tools:layout="@layout/fragment_switch_user" />

<fragment
android:id="@+id/attachMailboxFragment"
android:name="com.infomaniak.mail.ui.main.user.AttachMailboxFragment"
Expand All @@ -65,4 +56,10 @@
app:argType="string" />
</fragment>

<dialog
android:id="@+id/accountBottomSheetDialog"
android:name="com.infomaniak.mail.ui.bottomSheetDialogs.AccountBottomSheetDialog"
android:label="AccountBottomSheetDialog"
tools:layout="@layout/bottom_sheet_account" />

</navigation>

0 comments on commit 1470ccd

Please sign in to comment.