1
0
Fork 0

No issue: Removes unnecessary fragment transitions from accounts

Co-authored-by: ekager <emilykager@gmail.com>
master
Sawyer Blatz 2019-07-18 14:40:04 -07:00 committed by Emily Kager
parent becdb88f4b
commit e25ceafd1f
3 changed files with 2 additions and 36 deletions

View File

@ -43,10 +43,7 @@ import org.mozilla.fenix.library.bookmarks.BookmarkFragmentDirections
import org.mozilla.fenix.library.bookmarks.selectfolder.SelectBookmarkFolderFragmentDirections
import org.mozilla.fenix.library.history.HistoryFragmentDirections
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.TurnOnSyncFragmentDirections
import org.mozilla.fenix.share.ShareFragment
import org.mozilla.fenix.utils.Settings
@ -252,18 +249,6 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
fragmentId = R.id.historyFragment
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 {
null
@ -392,6 +377,5 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
enum class BrowserDirection {
FromGlobal, FromHome, FromSearch, FromSettings, FromBookmarks,
FromBookmarksFolderSelect, FromHistory, FromPair, FromTurnOnSync,
FromAccountProblem
FromBookmarksFolderSelect, FromHistory
}

View File

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

View File

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