No issue: Removes unnecessary fragment transitions from accounts

Co-authored-by: ekager <emilykager@gmail.com>
nightly-build-test
Sawyer Blatz 5 years ago committed by Emily Kager
parent becdb88f4b
commit e25ceafd1f

@ -43,10 +43,7 @@ import org.mozilla.fenix.library.bookmarks.BookmarkFragmentDirections
import org.mozilla.fenix.library.bookmarks.selectfolder.SelectBookmarkFolderFragmentDirections import org.mozilla.fenix.library.bookmarks.selectfolder.SelectBookmarkFolderFragmentDirections
import org.mozilla.fenix.library.history.HistoryFragmentDirections import org.mozilla.fenix.library.history.HistoryFragmentDirections
import org.mozilla.fenix.search.SearchFragmentDirections import org.mozilla.fenix.search.SearchFragmentDirections
import org.mozilla.fenix.settings.AccountProblemFragmentDirections
import org.mozilla.fenix.settings.PairFragmentDirections
import org.mozilla.fenix.settings.SettingsFragmentDirections import org.mozilla.fenix.settings.SettingsFragmentDirections
import org.mozilla.fenix.settings.TurnOnSyncFragmentDirections
import org.mozilla.fenix.share.ShareFragment import org.mozilla.fenix.share.ShareFragment
import org.mozilla.fenix.utils.Settings import org.mozilla.fenix.utils.Settings
@ -252,18 +249,6 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
fragmentId = R.id.historyFragment fragmentId = R.id.historyFragment
HistoryFragmentDirections.actionHistoryFragmentToBrowserFragment(customTabSessionId) HistoryFragmentDirections.actionHistoryFragmentToBrowserFragment(customTabSessionId)
} }
BrowserDirection.FromPair -> {
fragmentId = R.id.pairFragment
PairFragmentDirections.actionPairFragmentToBrowserFragment(customTabSessionId)
}
BrowserDirection.FromTurnOnSync -> {
fragmentId = R.id.turnOnSyncFragment
TurnOnSyncFragmentDirections.actionTurnOnSyncFragmentToBrowserFragment(customTabSessionId)
}
BrowserDirection.FromAccountProblem -> {
fragmentId = R.id.turnOnSyncFragment
AccountProblemFragmentDirections.actionAccountProblemFragmentToBrowserFragment(customTabSessionId)
}
} }
} else { } else {
null null
@ -392,6 +377,5 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
enum class BrowserDirection { enum class BrowserDirection {
FromGlobal, FromHome, FromSearch, FromSettings, FromBookmarks, FromGlobal, FromHome, FromSearch, FromSettings, FromBookmarks,
FromBookmarksFolderSelect, FromHistory, FromPair, FromTurnOnSync, FromBookmarksFolderSelect, FromHistory
FromAccountProblem
} }

@ -14,8 +14,6 @@ import kotlinx.coroutines.launch
import mozilla.components.concept.sync.AccountObserver import mozilla.components.concept.sync.AccountObserver
import mozilla.components.concept.sync.OAuthAccount import mozilla.components.concept.sync.OAuthAccount
import mozilla.components.concept.sync.Profile import mozilla.components.concept.sync.Profile
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.nav
@ -58,9 +56,6 @@ class AccountProblemFragment : PreferenceFragmentCompat(), AccountObserver {
// session history stack. // session history stack.
// We could auto-close this tab once we get to the end of the authentication process? // We could auto-close this tab once we get to the end of the authentication process?
// Via an interceptor, perhaps. // Via an interceptor, perhaps.
view?.let {
(activity as HomeActivity).openToBrowser(BrowserDirection.FromAccountProblem)
}
true true
} }
} }

@ -334,11 +334,6 @@
android:id="@+id/turnOnSyncFragment" android:id="@+id/turnOnSyncFragment"
android:name="org.mozilla.fenix.settings.TurnOnSyncFragment" android:name="org.mozilla.fenix.settings.TurnOnSyncFragment"
android:label="@string/preferences_sync"> android:label="@string/preferences_sync">
<action
android:id="@+id/action_turnOnSyncFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@+id/settingsFragment"
app:popUpToInclusive="true" />
<action <action
android:id="@+id/action_turnOnSyncFragment_to_pairFragment" android:id="@+id/action_turnOnSyncFragment_to_pairFragment"
app:destination="@id/pairFragment" /> app:destination="@id/pairFragment" />
@ -348,11 +343,6 @@
android:id="@+id/pairFragment" android:id="@+id/pairFragment"
android:name="org.mozilla.fenix.settings.PairFragment" android:name="org.mozilla.fenix.settings.PairFragment"
android:label="@string/preferences_sync"> android:label="@string/preferences_sync">
<action
android:id="@+id/action_pairFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@+id/settingsFragment"
app:popUpToInclusive="true" />
</fragment> </fragment>
<fragment <fragment
@ -385,7 +375,7 @@
<fragment <fragment
android:id="@+id/deleteBrowsingDataFragment" android:id="@+id/deleteBrowsingDataFragment"
android:name="org.mozilla.fenix.settings.DeleteBrowsingDataFragment" android:name="org.mozilla.fenix.settings.DeleteBrowsingDataFragment"
android:label="@string/preferences_delete_browsing_data"></fragment> android:label="@string/preferences_delete_browsing_data"/>
<fragment <fragment
android:id="@+id/exceptionsFragment" android:id="@+id/exceptionsFragment"
android:name="org.mozilla.fenix.exceptions.ExceptionsFragment" android:name="org.mozilla.fenix.exceptions.ExceptionsFragment"
@ -457,9 +447,6 @@
android:id="@+id/action_accountProblemFragment_to_signOutFragment" android:id="@+id/action_accountProblemFragment_to_signOutFragment"
app:destination="@id/signOutFragment" /> app:destination="@id/signOutFragment" />
</fragment> </fragment>
<action
android:id="@+id/action_accountProblemFragment_to_browserFragment"
app:destination="@id/browserFragment" />
<dialog <dialog
android:id="@+id/signOutFragment" android:id="@+id/signOutFragment"
android:name="org.mozilla.fenix.settings.SignOutFragment" /> android:name="org.mozilla.fenix.settings.SignOutFragment" />

Loading…
Cancel
Save