fenix/app/src/main/java/org/mozilla/fenix/BrowserDirection.kt

42 lines
1.9 KiB
Kotlin
Raw Normal View History

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix
import androidx.annotation.IdRes
/**
* Used with [HomeActivity.openToBrowser] to indicate which fragment
* the browser is being opened from.
*
* @property fragmentId ID of the fragment opening the browser in the navigation graph.
* An ID of `0` indicates a global action with no corresponding opening fragment.
*/
enum class BrowserDirection(@IdRes val fragmentId: Int) {
FromGlobal(0),
FromHome(R.id.homeFragment),
FromSearchDialog(R.id.searchDialogFragment),
FromSettings(R.id.settingsFragment),
FromBookmarks(R.id.bookmarkFragment),
2022-03-04 18:06:51 +00:00
FromBookmarkSearchDialog(R.id.bookmarkSearchDialogFragment),
FromHistory(R.id.historyFragment),
2022-02-04 17:15:31 +00:00
FromHistorySearchDialog(R.id.historySearchDialogFragment),
FromHistoryMetadataGroup(R.id.historyMetadataGroupFragment),
2020-07-02 02:37:03 +00:00
FromTrackingProtectionExceptions(R.id.trackingProtectionExceptionsFragment),
2019-09-10 20:29:21 +00:00
FromAbout(R.id.aboutFragment),
FromTrackingProtection(R.id.trackingProtectionFragment),
FromHttpsOnlyMode(R.id.httpsOnlyFragment),
FromTrackingProtectionDialog(R.id.trackingProtectionPanelDialogFragment),
FromSavedLoginsFragment(R.id.savedLoginsFragment),
FromAddNewDeviceFragment(R.id.addNewDeviceFragment),
FromAddSearchEngineFragment(R.id.addSearchEngineFragment),
FromEditCustomSearchEngineFragment(R.id.editCustomSearchEngineFragment),
FromAddonDetailsFragment(R.id.addonDetailsFragment),
FromStudiesFragment(R.id.studiesFragment),
FromAddonPermissionsDetailsFragment(R.id.addonPermissionsDetailFragment),
FromLoginDetailFragment(R.id.loginDetailFragment),
2021-06-01 03:12:37 +00:00
FromTabsTray(R.id.tabsTrayFragment),
FromRecentlyClosed(R.id.recentlyClosedFragment),
}