Copione merged onto master
commit
69a9aeebae
|
@ -14,11 +14,6 @@ object FeatureFlags {
|
|||
*/
|
||||
const val pullToRefreshEnabled = false
|
||||
|
||||
/**
|
||||
* Allows edit of saved logins.
|
||||
*/
|
||||
const val loginsEdit = true
|
||||
|
||||
/**
|
||||
* Shows Synced Tabs in the tabs tray.
|
||||
*
|
||||
|
|
|
@ -159,15 +159,15 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|||
}
|
||||
|
||||
private fun initVisualCompletenessQueueAndQueueTasks() {
|
||||
val taskQueue = components.performance.visualCompletenessQueue
|
||||
val queue = components.performance.visualCompletenessQueue.queue
|
||||
|
||||
fun initQueue() {
|
||||
registerActivityLifecycleCallbacks(PerformanceActivityLifecycleCallbacks(taskQueue))
|
||||
registerActivityLifecycleCallbacks(PerformanceActivityLifecycleCallbacks(queue))
|
||||
}
|
||||
|
||||
fun queueInitExperiments() {
|
||||
if (settings().isExperimentationEnabled) {
|
||||
taskQueue.runIfReadyOrQueue {
|
||||
queue.runIfReadyOrQueue {
|
||||
Experiments.initialize(
|
||||
applicationContext = applicationContext,
|
||||
onExperimentsUpdated = {
|
||||
|
@ -188,7 +188,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|||
}
|
||||
|
||||
fun queueInitStorageAndServices() {
|
||||
components.performance.visualCompletenessQueue.runIfReadyOrQueue {
|
||||
components.performance.visualCompletenessQueue.queue.runIfReadyOrQueue {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
logger.info("Running post-visual completeness tasks...")
|
||||
logElapsedTime(logger, "Storage initialization") {
|
||||
|
@ -208,7 +208,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|||
|
||||
fun queueMetrics() {
|
||||
if (SDK_INT >= Build.VERSION_CODES.O) { // required by StorageStatsMetrics.
|
||||
taskQueue.runIfReadyOrQueue {
|
||||
queue.runIfReadyOrQueue {
|
||||
// Because it may be slow to capture the storage stats, it might be preferred to
|
||||
// create a WorkManager task for this metric, however, I ran out of
|
||||
// implementation time and WorkManager is harder to test.
|
||||
|
|
|
@ -21,7 +21,6 @@ import androidx.annotation.VisibleForTesting
|
|||
import androidx.annotation.VisibleForTesting.PROTECTED
|
||||
import androidx.appcompat.app.ActionBar
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.view.doOnPreDraw
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.NavDestination
|
||||
import androidx.navigation.NavDirections
|
||||
|
@ -56,7 +55,6 @@ import mozilla.components.support.ktx.android.content.share
|
|||
import mozilla.components.support.ktx.kotlin.isUrl
|
||||
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
|
||||
import mozilla.components.support.locale.LocaleAwareAppCompatActivity
|
||||
import mozilla.components.support.utils.RunWhenReadyQueue
|
||||
import mozilla.components.support.utils.SafeIntent
|
||||
import mozilla.components.support.utils.toSafeIntent
|
||||
import mozilla.components.support.webextensions.WebExtensionPopupFeature
|
||||
|
@ -104,6 +102,7 @@ import org.mozilla.fenix.tabtray.TabTrayDialogFragmentDirections
|
|||
import org.mozilla.fenix.theme.DefaultThemeManager
|
||||
import org.mozilla.fenix.theme.ThemeManager
|
||||
import org.mozilla.fenix.utils.BrowsersCache
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
/**
|
||||
* The main activity of the application. The application is primarily a single Activity (this one)
|
||||
|
@ -122,7 +121,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||
|
||||
private var isVisuallyComplete = false
|
||||
|
||||
private var visualCompletenessQueue: RunWhenReadyQueue? = null
|
||||
private var privateNotificationObserver: PrivateNotificationFeature<PrivateNotificationService>? = null
|
||||
|
||||
private var isToolbarInflated = false
|
||||
|
@ -164,13 +162,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||
|
||||
// Must be after we set the content view
|
||||
if (isVisuallyComplete) {
|
||||
rootContainer.doOnPreDraw {
|
||||
// This delay is temporary. We are delaying 5 seconds until the performance
|
||||
// team can locate the real point of visual completeness.
|
||||
it.postDelayed({
|
||||
visualCompletenessQueue!!.ready()
|
||||
}, delay)
|
||||
}
|
||||
components.performance.visualCompletenessQueue
|
||||
.attachViewToRunVisualCompletenessQueueLater(WeakReference(rootContainer))
|
||||
}
|
||||
|
||||
sessionObserver = UriOpenedObserver(this)
|
||||
|
@ -678,9 +671,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||
* The root container is null at this point, so let the HomeActivity know that
|
||||
* we are visually complete.
|
||||
*/
|
||||
fun postVisualCompletenessQueue(visualCompletenessQueue: RunWhenReadyQueue) {
|
||||
fun setVisualCompletenessQueueReady() {
|
||||
isVisuallyComplete = true
|
||||
this.visualCompletenessQueue = visualCompletenessQueue
|
||||
}
|
||||
|
||||
private fun captureSnapshotTelemetryMetrics() = CoroutineScope(Dispatchers.IO).launch {
|
||||
|
@ -717,7 +709,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||
const val PRIVATE_BROWSING_MODE = "private_browsing_mode"
|
||||
const val EXTRA_DELETE_PRIVATE_TABS = "notification_delete_and_open"
|
||||
const val EXTRA_OPENED_FROM_NOTIFICATION = "notification_open"
|
||||
const val delay = 5000L
|
||||
const val START_IN_RECENTS_SCREEN = "start_in_recents_screen"
|
||||
|
||||
// PWA must have been used within last 30 days to be considered "recently used" for the
|
||||
|
|
|
@ -66,6 +66,12 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
|
|||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
// letting go of the resources to avoid memory leak.
|
||||
adapter = null
|
||||
}
|
||||
|
||||
private fun bindRecyclerView(view: View) {
|
||||
val managementView = AddonsManagementView(
|
||||
navController = findNavController(),
|
||||
|
|
|
@ -591,7 +591,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
|
|||
|
||||
if (showEngineView) {
|
||||
engineView?.asView()?.isVisible = true
|
||||
swipeRefresh.alpha = 1f
|
||||
swipeRefresh?.alpha = 1f
|
||||
} else {
|
||||
engineView?.asView()?.isVisible = false
|
||||
}
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
package org.mozilla.fenix.components
|
||||
|
||||
import mozilla.components.support.utils.RunWhenReadyQueue
|
||||
import org.mozilla.fenix.perf.VisualCompletenessQueue
|
||||
|
||||
/**
|
||||
* Component group for all functionality related to performance.
|
||||
*/
|
||||
class PerformanceComponent {
|
||||
val visualCompletenessQueue by lazy { RunWhenReadyQueue() }
|
||||
val visualCompletenessQueue by lazy { VisualCompletenessQueue(RunWhenReadyQueue()) }
|
||||
}
|
||||
|
|
|
@ -725,7 +725,7 @@ class GleanMetricsService(private val context: Context) : MetricsService {
|
|||
|
||||
// The code below doesn't need to execute immediately, so we'll add them to the visual
|
||||
// completeness task queue to be run later.
|
||||
context.components.performance.visualCompletenessQueue.runIfReadyOrQueue {
|
||||
context.components.performance.visualCompletenessQueue.queue.runIfReadyOrQueue {
|
||||
// We have to initialize Glean *on* the main thread, because it registers lifecycle
|
||||
// observers. However, the activation ping must be sent *off* of the main thread,
|
||||
// because it calls Google ad APIs that must be called *off* of the main thread.
|
||||
|
|
|
@ -146,8 +146,11 @@ class HomeFragment : Fragment() {
|
|||
private val store: BrowserStore
|
||||
get() = requireComponents.core.store
|
||||
|
||||
private val onboarding by lazy { StrictMode.allowThreadDiskReads().resetPoliciesAfter {
|
||||
FenixOnboarding(requireContext()) } }
|
||||
private val onboarding by lazy {
|
||||
StrictMode.allowThreadDiskReads().resetPoliciesAfter {
|
||||
FenixOnboarding(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var homeFragmentStore: HomeFragmentStore
|
||||
private var _sessionControlInteractor: SessionControlInteractor? = null
|
||||
|
@ -193,7 +196,8 @@ class HomeFragment : Fragment() {
|
|||
topSites = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
|
||||
components.core.topSiteStorage.cachedTopSites
|
||||
},
|
||||
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip()
|
||||
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip(),
|
||||
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -201,6 +205,7 @@ class HomeFragment : Fragment() {
|
|||
_sessionControlInteractor = SessionControlInteractor(
|
||||
DefaultSessionControlController(
|
||||
activity = activity,
|
||||
settings = components.settings,
|
||||
engine = components.core.engine,
|
||||
metrics = components.analytics.metrics,
|
||||
sessionManager = sessionManager,
|
||||
|
@ -220,9 +225,9 @@ class HomeFragment : Fragment() {
|
|||
updateLayout(view)
|
||||
sessionControlView = SessionControlView(
|
||||
view.sessionControlRecyclerView,
|
||||
viewLifecycleOwner,
|
||||
sessionControlInteractor,
|
||||
homeViewModel,
|
||||
requireComponents.core.store.state.normalTabs.isNotEmpty()
|
||||
homeViewModel
|
||||
)
|
||||
|
||||
updateSessionControlView(view)
|
||||
|
@ -516,7 +521,8 @@ class HomeFragment : Fragment() {
|
|||
collections = components.core.tabCollectionStorage.cachedTabCollections,
|
||||
mode = currentMode.getCurrentMode(),
|
||||
topSites = components.core.topSiteStorage.cachedTopSites,
|
||||
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip()
|
||||
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip(),
|
||||
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -41,13 +41,16 @@ data class Tab(
|
|||
* @property mode The state of the [HomeFragment] UI.
|
||||
* @property tabs The list of opened [Tab] in the [HomeFragment].
|
||||
* @property topSites The list of [TopSite] in the [HomeFragment].
|
||||
* @property tip The current [Tip] to show on the [HomeFragment].
|
||||
* @property showCollectionPlaceholder If true, shows a placeholder when there are no collections.
|
||||
*/
|
||||
data class HomeFragmentState(
|
||||
val collections: List<TabCollection>,
|
||||
val expandedCollections: Set<Long>,
|
||||
val mode: Mode,
|
||||
val topSites: List<TopSite>,
|
||||
val tip: Tip? = null
|
||||
val tip: Tip? = null,
|
||||
val showCollectionPlaceholder: Boolean
|
||||
) : State
|
||||
|
||||
sealed class HomeFragmentAction : Action {
|
||||
|
@ -55,7 +58,8 @@ sealed class HomeFragmentAction : Action {
|
|||
val topSites: List<TopSite>,
|
||||
val mode: Mode,
|
||||
val collections: List<TabCollection>,
|
||||
val tip: Tip? = null
|
||||
val tip: Tip? = null,
|
||||
val showCollectionPlaceholder: Boolean
|
||||
) :
|
||||
HomeFragmentAction()
|
||||
|
||||
|
@ -66,6 +70,7 @@ sealed class HomeFragmentAction : Action {
|
|||
data class ModeChange(val mode: Mode) : HomeFragmentAction()
|
||||
data class TopSitesChange(val topSites: List<TopSite>) : HomeFragmentAction()
|
||||
data class RemoveTip(val tip: Tip) : HomeFragmentAction()
|
||||
object RemoveCollectionsPlaceholder : HomeFragmentAction()
|
||||
}
|
||||
|
||||
private fun homeFragmentStateReducer(
|
||||
|
@ -93,6 +98,11 @@ private fun homeFragmentStateReducer(
|
|||
is HomeFragmentAction.CollectionsChange -> state.copy(collections = action.collections)
|
||||
is HomeFragmentAction.ModeChange -> state.copy(mode = action.mode)
|
||||
is HomeFragmentAction.TopSitesChange -> state.copy(topSites = action.topSites)
|
||||
is HomeFragmentAction.RemoveTip -> { state.copy(tip = null) }
|
||||
is HomeFragmentAction.RemoveTip -> {
|
||||
state.copy(tip = null)
|
||||
}
|
||||
is HomeFragmentAction.RemoveCollectionsPlaceholder -> {
|
||||
state.copy(showCollectionPlaceholder = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,13 @@ import android.content.Context
|
|||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import mozilla.components.feature.tab.collections.TabCollection
|
||||
import mozilla.components.feature.top.sites.TopSite
|
||||
import org.mozilla.fenix.components.Components
|
||||
import org.mozilla.fenix.components.tips.Tip
|
||||
import org.mozilla.fenix.home.OnboardingState
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionHeaderViewHolder
|
||||
|
@ -135,7 +137,8 @@ class AdapterItemDiffCallback : DiffUtil.ItemCallback<AdapterItem>() {
|
|||
|
||||
class SessionControlAdapter(
|
||||
private val interactor: SessionControlInteractor,
|
||||
private val hasNormalTabsOpened: Boolean
|
||||
private val viewLifecycleOwner: LifecycleOwner,
|
||||
private val components: Components
|
||||
) : ListAdapter<AdapterItem, RecyclerView.ViewHolder>(AdapterItemDiffCallback()) {
|
||||
|
||||
// This method triggers the ComplexMethod lint error when in fact it's quite simple.
|
||||
|
@ -150,7 +153,12 @@ class SessionControlAdapter(
|
|||
interactor
|
||||
)
|
||||
NoCollectionsMessageViewHolder.LAYOUT_ID ->
|
||||
NoCollectionsMessageViewHolder(view, interactor, hasNormalTabsOpened)
|
||||
NoCollectionsMessageViewHolder(
|
||||
view,
|
||||
viewLifecycleOwner,
|
||||
components.core.store,
|
||||
interactor
|
||||
)
|
||||
CollectionHeaderViewHolder.LAYOUT_ID -> CollectionHeaderViewHolder(view)
|
||||
CollectionViewHolder.LAYOUT_ID -> CollectionViewHolder(view, interactor)
|
||||
TabInCollectionViewHolder.LAYOUT_ID -> TabInCollectionViewHolder(
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.mozilla.fenix.home.HomeFragmentAction
|
|||
import org.mozilla.fenix.home.HomeFragmentDirections
|
||||
import org.mozilla.fenix.home.HomeFragmentStore
|
||||
import org.mozilla.fenix.settings.SupportUtils
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
import mozilla.components.feature.tab.collections.Tab as ComponentTab
|
||||
|
||||
/**
|
||||
|
@ -144,11 +145,17 @@ interface SessionControlController {
|
|||
* @see [CollectionInteractor.onAddTabsToCollectionTapped]
|
||||
*/
|
||||
fun handleCreateCollection()
|
||||
|
||||
/**
|
||||
* @see [CollectionInteractor.onRemoveCollectionsPlaceholder]
|
||||
*/
|
||||
fun handleRemoveCollectionsPlaceholder()
|
||||
}
|
||||
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
class DefaultSessionControlController(
|
||||
private val activity: HomeActivity,
|
||||
private val settings: Settings,
|
||||
private val engine: Engine,
|
||||
private val metrics: MetricController,
|
||||
private val sessionManager: SessionManager,
|
||||
|
@ -213,7 +220,11 @@ class DefaultSessionControlController(
|
|||
metrics.track(Event.CollectionAllTabsRestored)
|
||||
}
|
||||
|
||||
override fun handleCollectionRemoveTab(collection: TabCollection, tab: ComponentTab, wasSwiped: Boolean) {
|
||||
override fun handleCollectionRemoveTab(
|
||||
collection: TabCollection,
|
||||
tab: ComponentTab,
|
||||
wasSwiped: Boolean
|
||||
) {
|
||||
metrics.track(Event.CollectionTabRemoved)
|
||||
|
||||
if (collection.tabs.size == 1) {
|
||||
|
@ -223,7 +234,13 @@ class DefaultSessionControlController(
|
|||
)
|
||||
val message =
|
||||
activity.resources.getString(R.string.delete_tab_and_collection_dialog_message)
|
||||
showDeleteCollectionPrompt(collection, title, message, wasSwiped, handleSwipedItemDeletionCancel)
|
||||
showDeleteCollectionPrompt(
|
||||
collection,
|
||||
title,
|
||||
message,
|
||||
wasSwiped,
|
||||
handleSwipedItemDeletionCancel
|
||||
)
|
||||
} else {
|
||||
viewLifecycleScope.launch(Dispatchers.IO) {
|
||||
tabCollectionStorage.removeTabFromCollection(collection, tab)
|
||||
|
@ -369,6 +386,11 @@ class DefaultSessionControlController(
|
|||
showTabTrayCollectionCreation()
|
||||
}
|
||||
|
||||
override fun handleRemoveCollectionsPlaceholder() {
|
||||
settings.showCollectionsPlaceholderOnHome = false
|
||||
fragmentStore.dispatch(HomeFragmentAction.RemoveCollectionsPlaceholder)
|
||||
}
|
||||
|
||||
private fun showShareFragment(shareSubject: String, data: List<ShareData>) {
|
||||
val directions = HomeFragmentDirections.actionGlobalShareFragment(
|
||||
shareSubject = shareSubject,
|
||||
|
|
|
@ -93,6 +93,11 @@ interface CollectionInteractor {
|
|||
* Opens the collection creator
|
||||
*/
|
||||
fun onAddTabsToCollectionTapped()
|
||||
|
||||
/**
|
||||
* User has removed the collections placeholder from home.
|
||||
*/
|
||||
fun onRemoveCollectionsPlaceholder()
|
||||
}
|
||||
|
||||
interface ToolbarInteractor {
|
||||
|
@ -256,4 +261,8 @@ class SessionControlInteractor(
|
|||
override fun onPaste(clipboardText: String) {
|
||||
controller.handlePaste(clipboardText)
|
||||
}
|
||||
|
||||
override fun onRemoveCollectionsPlaceholder() {
|
||||
controller.handleRemoveCollectionsPlaceholder()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
package org.mozilla.fenix.home.sessioncontrol
|
||||
|
||||
import android.view.View
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -13,6 +14,7 @@ import mozilla.components.feature.tab.collections.TabCollection
|
|||
import mozilla.components.feature.top.sites.TopSite
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.tips.Tip
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.home.HomeFragmentState
|
||||
import org.mozilla.fenix.home.HomeScreenViewModel
|
||||
import org.mozilla.fenix.home.Mode
|
||||
|
@ -25,7 +27,8 @@ private fun normalModeAdapterItems(
|
|||
topSites: List<TopSite>,
|
||||
collections: List<TabCollection>,
|
||||
expandedCollections: Set<Long>,
|
||||
tip: Tip?
|
||||
tip: Tip?,
|
||||
showCollectionsPlaceholder: Boolean
|
||||
): List<AdapterItem> {
|
||||
val items = mutableListOf<AdapterItem>()
|
||||
|
||||
|
@ -36,8 +39,9 @@ private fun normalModeAdapterItems(
|
|||
}
|
||||
|
||||
if (collections.isEmpty()) {
|
||||
items.add(AdapterItem.CollectionHeader)
|
||||
items.add(AdapterItem.NoCollectionsMessage)
|
||||
if (showCollectionsPlaceholder) {
|
||||
items.add(AdapterItem.NoCollectionsMessage)
|
||||
}
|
||||
} else {
|
||||
showCollections(collections, expandedCollections, items)
|
||||
}
|
||||
|
@ -68,62 +72,77 @@ private fun onboardingAdapterItems(onboardingState: OnboardingState): List<Adapt
|
|||
val items: MutableList<AdapterItem> = mutableListOf(AdapterItem.OnboardingHeader)
|
||||
|
||||
// Customize FxA items based on where we are with the account state:
|
||||
items.addAll(when (onboardingState) {
|
||||
OnboardingState.SignedOutNoAutoSignIn -> {
|
||||
listOf(
|
||||
AdapterItem.OnboardingManualSignIn
|
||||
)
|
||||
items.addAll(
|
||||
when (onboardingState) {
|
||||
OnboardingState.SignedOutNoAutoSignIn -> {
|
||||
listOf(
|
||||
AdapterItem.OnboardingManualSignIn
|
||||
)
|
||||
}
|
||||
is OnboardingState.SignedOutCanAutoSignIn -> {
|
||||
listOf(
|
||||
AdapterItem.OnboardingAutomaticSignIn(onboardingState)
|
||||
)
|
||||
}
|
||||
OnboardingState.SignedIn -> listOf()
|
||||
}
|
||||
is OnboardingState.SignedOutCanAutoSignIn -> {
|
||||
listOf(
|
||||
AdapterItem.OnboardingAutomaticSignIn(onboardingState)
|
||||
)
|
||||
}
|
||||
OnboardingState.SignedIn -> listOf()
|
||||
})
|
||||
)
|
||||
|
||||
items.addAll(listOf(
|
||||
AdapterItem.OnboardingSectionHeader {
|
||||
val appName = it.getString(R.string.app_name)
|
||||
it.getString(R.string.onboarding_feature_section_header, appName)
|
||||
},
|
||||
AdapterItem.OnboardingWhatsNew,
|
||||
AdapterItem.OnboardingTrackingProtection,
|
||||
AdapterItem.OnboardingThemePicker,
|
||||
AdapterItem.OnboardingPrivateBrowsing,
|
||||
AdapterItem.OnboardingToolbarPositionPicker,
|
||||
AdapterItem.OnboardingPrivacyNotice,
|
||||
AdapterItem.OnboardingFinish
|
||||
))
|
||||
items.addAll(
|
||||
listOf(
|
||||
AdapterItem.OnboardingSectionHeader {
|
||||
val appName = it.getString(R.string.app_name)
|
||||
it.getString(R.string.onboarding_feature_section_header, appName)
|
||||
},
|
||||
AdapterItem.OnboardingWhatsNew,
|
||||
AdapterItem.OnboardingTrackingProtection,
|
||||
AdapterItem.OnboardingThemePicker,
|
||||
AdapterItem.OnboardingPrivateBrowsing,
|
||||
AdapterItem.OnboardingToolbarPositionPicker,
|
||||
AdapterItem.OnboardingPrivacyNotice,
|
||||
AdapterItem.OnboardingFinish
|
||||
)
|
||||
)
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
private fun HomeFragmentState.toAdapterList(): List<AdapterItem> = when (mode) {
|
||||
is Mode.Normal -> normalModeAdapterItems(topSites, collections, expandedCollections, tip)
|
||||
is Mode.Normal -> normalModeAdapterItems(
|
||||
topSites,
|
||||
collections,
|
||||
expandedCollections,
|
||||
tip,
|
||||
showCollectionPlaceholder
|
||||
)
|
||||
is Mode.Private -> privateModeAdapterItems()
|
||||
is Mode.Onboarding -> onboardingAdapterItems(mode.state)
|
||||
}
|
||||
|
||||
private fun collectionTabItems(collection: TabCollection) = collection.tabs.mapIndexed { index, tab ->
|
||||
private fun collectionTabItems(collection: TabCollection) =
|
||||
collection.tabs.mapIndexed { index, tab ->
|
||||
AdapterItem.TabInCollectionItem(collection, tab, index == collection.tabs.lastIndex)
|
||||
}
|
||||
}
|
||||
|
||||
class SessionControlView(
|
||||
override val containerView: View?,
|
||||
override val containerView: View,
|
||||
viewLifecycleOwner: LifecycleOwner,
|
||||
interactor: SessionControlInteractor,
|
||||
private var homeScreenViewModel: HomeScreenViewModel,
|
||||
private val hasNormalTabsOpened: Boolean
|
||||
private var homeScreenViewModel: HomeScreenViewModel
|
||||
) : LayoutContainer {
|
||||
|
||||
val view: RecyclerView = containerView as RecyclerView
|
||||
|
||||
private val sessionControlAdapter = SessionControlAdapter(interactor, hasNormalTabsOpened)
|
||||
private val sessionControlAdapter = SessionControlAdapter(
|
||||
interactor,
|
||||
viewLifecycleOwner,
|
||||
containerView.context.components
|
||||
)
|
||||
|
||||
init {
|
||||
view.apply {
|
||||
adapter = sessionControlAdapter
|
||||
layoutManager = LinearLayoutManager(containerView!!.context)
|
||||
layoutManager = LinearLayoutManager(containerView.context)
|
||||
val itemTouchHelper =
|
||||
ItemTouchHelper(
|
||||
SwipeToDeleteCallback(
|
||||
|
|
|
@ -6,22 +6,50 @@ package org.mozilla.fenix.home.sessioncontrol.viewholders
|
|||
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import kotlinx.android.synthetic.main.no_collections_message.*
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.flow.map
|
||||
import mozilla.components.browser.state.selector.normalTabs
|
||||
import mozilla.components.browser.state.store.BrowserStore
|
||||
import mozilla.components.lib.state.ext.flowScoped
|
||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.utils.view.ViewHolder
|
||||
import org.mozilla.fenix.ext.increaseTapArea
|
||||
import org.mozilla.fenix.home.sessioncontrol.CollectionInteractor
|
||||
import org.mozilla.fenix.utils.view.ViewHolder
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
open class NoCollectionsMessageViewHolder(
|
||||
view: View,
|
||||
interactor: CollectionInteractor,
|
||||
hasNormalTabsOpened: Boolean
|
||||
viewLifecycleOwner: LifecycleOwner,
|
||||
store: BrowserStore,
|
||||
interactor: CollectionInteractor
|
||||
) : ViewHolder(view) {
|
||||
|
||||
init {
|
||||
add_tabs_to_collections_button.setOnClickListener {
|
||||
interactor.onAddTabsToCollectionTapped()
|
||||
}
|
||||
add_tabs_to_collections_button.isVisible = hasNormalTabsOpened
|
||||
|
||||
remove_collection_placeholder.increaseTapArea(
|
||||
view.resources.getDimensionPixelSize(R.dimen.tap_increase_16)
|
||||
)
|
||||
|
||||
remove_collection_placeholder.setOnClickListener {
|
||||
interactor.onRemoveCollectionsPlaceholder()
|
||||
}
|
||||
|
||||
add_tabs_to_collections_button.isVisible = store.state.normalTabs.isNotEmpty()
|
||||
|
||||
store.flowScoped(viewLifecycleOwner) { flow ->
|
||||
flow.map { state -> state.normalTabs.size }
|
||||
.ifChanged()
|
||||
.collect { tabs ->
|
||||
add_tabs_to_collections_button.isVisible = tabs > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* 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.perf
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.view.doOnPreDraw
|
||||
import mozilla.components.support.utils.RunWhenReadyQueue
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
/**
|
||||
* class for all functionality related to Visual completeness queue
|
||||
*/
|
||||
class VisualCompletenessQueue(val queue: RunWhenReadyQueue) {
|
||||
@Suppress("MagicNumber")
|
||||
val delay = 5000L
|
||||
|
||||
/**
|
||||
*
|
||||
* @param containerWeakReference a weak reference to the root view of a view hierarchy. Weak
|
||||
* reference is to avoid memory leak.
|
||||
*/
|
||||
fun attachViewToRunVisualCompletenessQueueLater(containerWeakReference: WeakReference<View>) {
|
||||
containerWeakReference.get()?.doOnPreDraw {
|
||||
// This delay is temporary. We are delaying 5 seconds until the performance
|
||||
// team can locate the real point of visual completeness.
|
||||
it.postDelayed({
|
||||
queue.ready()
|
||||
}, delay)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -51,7 +51,7 @@ class PerformanceActivityLifecycleCallbacks(
|
|||
if (activity is HomeActivity) {
|
||||
// We should delay the visualCompletenessQueue when reaching the HomeActivity
|
||||
// to ensure all tasks are delayed until after visual completeness
|
||||
activity.postVisualCompletenessQueue(visualCompletenessQueue)
|
||||
activity.setVisualCompletenessQueueReady()
|
||||
} else if (shouldStartVisualCompletenessQueueImmediately()) {
|
||||
// If we do not go through the home activity, we have to start the tasks
|
||||
// immediately to avoid spending time implementing it.
|
||||
|
|
|
@ -25,7 +25,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||
import kotlinx.coroutines.ObsoleteCoroutinesApi
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import org.mozilla.fenix.BrowserDirection
|
||||
import org.mozilla.fenix.FeatureFlags
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.FenixSnackbar
|
||||
|
@ -169,11 +168,7 @@ class LoginDetailFragment : Fragment(R.layout.fragment_login_detail) {
|
|||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
if (FeatureFlags.loginsEdit) {
|
||||
inflater.inflate(R.menu.login_options_menu, menu)
|
||||
} else {
|
||||
inflater.inflate(R.menu.login_delete, menu)
|
||||
}
|
||||
inflater.inflate(R.menu.login_options_menu, menu)
|
||||
this.menu = menu
|
||||
}
|
||||
|
||||
|
|
|
@ -249,6 +249,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||
default = false
|
||||
)
|
||||
|
||||
var showCollectionsPlaceholderOnHome by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_collections_placeholder_home),
|
||||
default = true
|
||||
)
|
||||
|
||||
val isCrashReportingEnabled: Boolean
|
||||
get() = isCrashReportEnabledInBuild &&
|
||||
preferences.getBoolean(
|
||||
|
|
|
@ -2,42 +2,63 @@
|
|||
<!-- 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/. -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/no_collections_wrapper"
|
||||
android:background="@drawable/empty_session_control_background"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@drawable/empty_session_control_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_collections_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_collections_header1"
|
||||
tools:drawableEnd="@drawable/ic_tab_collection"
|
||||
android:text="@string/collections_header"
|
||||
android:textAppearance="@style/HeaderTextStyle"
|
||||
android:textSize="16sp"
|
||||
app:fontFamily="@font/metropolis_semibold" />
|
||||
app:fontFamily="@font/metropolis_semibold"
|
||||
app:layout_constraintEnd_toStartOf="@id/remove_collection_placeholder"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/remove_collection_placeholder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/remove_home_collection_placeholder_content_description"
|
||||
app:layout_constraintBottom_toBottomOf="@id/no_collections_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/no_collections_header"
|
||||
app:srcCompat="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_collections_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/no_collections_description1"
|
||||
android:text="@string/no_collections_description2"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="14sp"
|
||||
android:textAlignment="viewStart" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/no_collections_header" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/add_tabs_to_collections_button"
|
||||
style="@style/PositiveButton"
|
||||
app:icon="@drawable/ic_tab_collection"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/tabs_menu_save_to_collection1"
|
||||
android:layout_marginTop="8dp"/>
|
||||
</LinearLayout>
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_tab_collection"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/no_collections_description" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="none"
|
||||
android:gravity="center_vertical"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:scrollHorizontally="false"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?primaryText"
|
||||
android:textDirection="locale"
|
||||
android:textSize="14sp"
|
||||
tools:text="@string/private_browsing_placeholder_description_2" />
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- 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/. -->
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/login_delete" >
|
||||
<item
|
||||
android:id="@+id/delete_login_button"
|
||||
android:contentDescription="@string/login_menu_delete_button"
|
||||
android:icon="@drawable/ic_delete"
|
||||
android:title="@string/login_menu_delete_button"
|
||||
app:iconTint="?primaryText"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
|
@ -15,10 +15,10 @@
|
|||
<!-- Placeholder text shown in the search bar before a user enters text -->
|
||||
<string name="search_hint">Gueta o introduz una direición</string>
|
||||
<!-- No Open Tabs Message Description -->
|
||||
<string name="no_open_tabs_description">Equi van amosase les llingüetes abiertes.</string>
|
||||
<string name="no_open_tabs_description">Equí van amosase les llingüetes abiertes.</string>
|
||||
|
||||
<!-- No Private Tabs Message Description -->
|
||||
<string name="no_private_tabs_description">Equi van amosase les llingüetes abiertes.</string>
|
||||
<string name="no_private_tabs_description">Equí van amosase les llingüetes abiertes.</string>
|
||||
|
||||
<!-- Message announced to the user when tab tray is selected with 1 tab -->
|
||||
<string name="open_tab_tray_single">1 llingüeta abierta. Toca pa cambiar a otra.</string>
|
||||
|
@ -128,6 +128,8 @@
|
|||
<string name="browser_menu_powered_by2">Cola potencia de %1$s</string>
|
||||
<!-- Browser menu button to put the current page in reader mode -->
|
||||
<string name="browser_menu_read">Mou de llector</string>
|
||||
<!-- Browser menu button content description to close reader mode and return the user to the regular browser -->
|
||||
<string name="browser_menu_read_close">Zarrar la vista de llector</string>
|
||||
<!-- Browser menu button to open the current page in an external app -->
|
||||
<string name="browser_menu_open_app_link">Abrir nuna aplicación</string>
|
||||
<!-- Browser menu button to configure reader mode appearance e.g. the used font type and size -->
|
||||
|
@ -895,8 +897,7 @@
|
|||
<string name="onboarding_whats_new_description">¿Tienes entrugues tocante al rediseñu de %s?¿Quies saber qué camudó?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Consigui rempuestes equí</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Aprovecha %s al máximu.</string>
|
||||
<!-- text for the automatic sign-in button while signing in is in process -->
|
||||
<string name="onboarding_firefox_account_signing_in">Aniciando sesión…</string>
|
||||
|
|
|
@ -305,9 +305,14 @@
|
|||
|
||||
<!-- Preference for open links in third party apps -->
|
||||
<string name="preferences_open_links_in_apps">Obre els enllaços en les aplicacions</string>
|
||||
<!-- Preference for open download with an external download manager app -->
|
||||
<string name="preferences_external_download_manager">Gestor de baixades extern</string>
|
||||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Complements</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Notificacions</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Sincronitza ara</string>
|
||||
|
@ -576,6 +581,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">No hi ha informació d’historial</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">No hi ha cap baixada</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">%1$d seleccionades</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">El %1$s no pot carregar aquesta pàgina.</string>
|
||||
|
@ -983,9 +995,10 @@
|
|||
<string name="onboarding_whats_new_description">Teniu preguntes sobre el redisseny del %s? Voleu saber què ha canviat?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Vegeu les respostes aquí</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Traieu tot el profit al %s.</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Més informació</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1476,6 +1489,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Inicia la sessió per sincronitzar</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">No hi ha cap pestanya oberta</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">S’ha arribat al límit de llocs principals</string>
|
||||
|
|
|
@ -307,6 +307,9 @@
|
|||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Dodaci</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Obavijesti</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Sinkroniziraj sada</string>
|
||||
|
@ -581,6 +584,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">Nema povijesti</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Ovdje nema preuzimanja</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">Odabrano: %1$d</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Oprosti. %1$s ne može učitati tu stranicu.</string>
|
||||
|
@ -988,9 +998,10 @@
|
|||
<string name="onboarding_whats_new_description">Imaš pitanja o redizajniranom %su? Želiš znati što se promijenilo?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Potraži odgovore ovdje</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Iskoristi sve prednosti %sa</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Saznaj više</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1488,6 +1499,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Prijavi se za sinkronizaciju</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Nema otvorenih kartica</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Dostignuto ograničenje za omiljene stranice</string>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<string name="tab_tray_multiselect_selected_content_description">Ընտրված</string>
|
||||
|
||||
<!-- About content. The first parameter is the name of the application. (For example: Fenix) -->
|
||||
<string name="about_content">%1$s-ն արտադրվում է Mozilla-ի կողմից:</string>
|
||||
<string name="about_content">%1$s-ը մշակված է Mozilla-ի կողմից:</string>
|
||||
|
||||
<!-- Private Browsing -->
|
||||
<!-- Title for private session option -->
|
||||
|
@ -184,9 +184,9 @@
|
|||
<!-- Button in the search suggestions onboarding that does not allow search suggestions in private sessions -->
|
||||
<string name="search_suggestions_onboarding_do_not_allow_button">Չթույլատրել</string>
|
||||
<!-- Search suggestion onboarding hint title text -->
|
||||
<string name="search_suggestions_onboarding_title">Թույլատրեք որոնման առաջարկներ մասնավոր աշխատաշրջաններում:</string>
|
||||
<string name="search_suggestions_onboarding_title">Թույլատրել որոնման առաջարկներ մասնավոր աշխատաշրջաններում:</string>
|
||||
<!-- Search suggestion onboarding hint description text, first parameter is the name of the app defined in app_name (for example: Fenix)-->
|
||||
<string name="search_suggestions_onboarding_text">%s-ը համօգտագործելու է այն ամենը, ինչ մուտքագրում եք հասցեի տողում՝ ձեր սկզբնական որոնիչի հետ:</string>
|
||||
<string name="search_suggestions_onboarding_text">%s-ը համօգտագործելու է այն ամենը, ինչ մուտքագրում եք հասցեի տողում ձեր սկզբնական որոնիչի հետ:</string>
|
||||
<!-- Search suggestion onboarding hint Learn more link text -->
|
||||
<string name="search_suggestions_onboarding_learn_more_link">Իմանալ ավելին</string>
|
||||
|
||||
|
@ -266,13 +266,13 @@
|
|||
<!-- Preference for settings related to visual options -->
|
||||
<string name="preferences_customize">Հարմարեցնել</string>
|
||||
<!-- Preference description for banner about signing in -->
|
||||
<string name="preferences_sign_in_description">Համաժամեցեք էջանիշները, պատմությունը և ավելին ձեր Firefox հաշվի հետ</string>
|
||||
<string name="preferences_sign_in_description">Համաժամեցրեք էջանիշները, պատմությունը և ավելին ձեր Firefox հաշվի հետ</string>
|
||||
<!-- Preference shown instead of account display name while account profile information isn't available yet. -->
|
||||
<string name="preferences_account_default_name">Firefox-ի հաշիվ</string>
|
||||
<!-- Preference text for account title when there was an error syncing FxA -->
|
||||
<string name="preferences_account_sync_error">Կրկին կապակցվեք՝ համաժամեցումը վերսկսելու համար</string>
|
||||
<!-- Preference for language -->
|
||||
<string name="preferences_language">Լեզու</string>
|
||||
<string name="preferences_language">Լեզուն</string>
|
||||
|
||||
<!-- Preference for data choices -->
|
||||
<string name="preferences_data_choices">Տվյալների ընտրություն</string>
|
||||
|
@ -303,9 +303,14 @@
|
|||
<string name="preferences_account_settings">Հաշվի կարգավորումներ</string>
|
||||
<!-- Preference for open links in third party apps -->
|
||||
<string name="preferences_open_links_in_apps">Բացել հղումները հավելվածներում</string>
|
||||
<!-- Preference for open download with an external download manager app -->
|
||||
<string name="preferences_external_download_manager">Ներբեռնումների արտաքին հավելված</string>
|
||||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Հավելումներ</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Ծանուցումներ</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Համաժամեցնել</string>
|
||||
|
@ -377,7 +382,7 @@
|
|||
<!-- Preference switch for Telemetry -->
|
||||
<string name="preferences_telemetry">Telemetry</string>
|
||||
<!-- Preference switch for usage and technical data collection -->
|
||||
<string name="preference_usage_data">Օգտագործում և տեխնիկական տվյալներ</string>
|
||||
<string name="preference_usage_data">Օգտագործման և տեխնիկական տվյալներ</string>
|
||||
<!-- Preference description for usage and technical data collection -->
|
||||
<string name="preferences_usage_data_description">Կիսվում է արագագործության, օգտագործման, սարքակազմի և ձեր դիտարկիչի կարգավորումներով Mozilla-ի հետ՝ %1$s-ը էլ ավելի լավը դարձնելու համար</string>
|
||||
<!-- Preference switch for marketing data collection -->
|
||||
|
@ -572,6 +577,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">Այստեղ պատմություն չկա</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Չկան նեևբեռնումներ</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">Ընտրված է %1$d-ը</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Ներողություն. %1$s-ը չի կարող բեռնել այդ էջը:</string>
|
||||
|
@ -622,7 +634,7 @@
|
|||
<!-- Bookmark overflow menu open in new tab button -->
|
||||
<string name="bookmark_menu_open_in_new_tab_button">Բացել նոր ներդիր</string>
|
||||
<!-- Bookmark overflow menu open in private tab button -->
|
||||
<string name="bookmark_menu_open_in_private_tab_button">Բացել Գաղտնի ներդիրով</string>
|
||||
<string name="bookmark_menu_open_in_private_tab_button">Բացել Գաղտնի ներդիրում</string>
|
||||
<!-- Bookmark overflow menu delete button -->
|
||||
<string name="bookmark_menu_delete_button">Ջնջել</string>
|
||||
<!--Bookmark overflow menu save button -->
|
||||
|
@ -894,7 +906,7 @@
|
|||
<!-- Subtitle for the tabs item in Delete browsing data, parameter will be replaced with the number of open tabs -->
|
||||
<string name="preferences_delete_browsing_data_tabs_subtitle">%d ներդիրներ</string>
|
||||
<!-- Title for the data and history items in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_browsing_data_title">Պատմության և կայքի տվյալների դիտարկում</string>
|
||||
<string name="preferences_delete_browsing_data_browsing_data_title">Դիտարկման պատմություն և կայքերի տվյալներ</string>
|
||||
<!-- Subtitle for the data and history items in delete browsing data, parameter will be replaced with the
|
||||
number of history items the user has -->
|
||||
<string name="preferences_delete_browsing_data_browsing_data_subtitle">%d հասցեներ</string>
|
||||
|
@ -906,13 +918,13 @@
|
|||
<!-- Title for the cookies item in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_cookies">Cookie-ներ</string>
|
||||
<!-- Subtitle for the cookies item in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_cookies_subtitle">Դուք դուրս կգրվեք կայքերի մեծ մասից</string>
|
||||
<string name="preferences_delete_browsing_data_cookies_subtitle">Դուրս կգրվեք կայքերի մեծ մասից</string>
|
||||
<!-- Title for the cached images and files item in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_cached_files">Պահված պատկերներն ու ֆայլերը</string>
|
||||
<string name="preferences_delete_browsing_data_cached_files">Շտեմված պատկերներ ու ֆայլեր</string>
|
||||
<!-- Subtitle for the cached images and files item in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_cached_files_subtitle">Ազատում է պահեստային տարածք</string>
|
||||
<!-- Title for the site permissions item in Delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_site_permissions">Կայքի թույլտվություններ</string>
|
||||
<string name="preferences_delete_browsing_data_site_permissions">Կայքերի թույլտվություններ</string>
|
||||
<!-- Text for the button to delete browsing data -->
|
||||
<string name="preferences_delete_browsing_data_button">Ջնջել դիտարկման տվյալները</string>
|
||||
<!-- Title for the Delete browsing data on quit preference -->
|
||||
|
@ -982,6 +994,8 @@
|
|||
<string name="onboarding_whats_new_description_linktext">Ստացեք պատասխանները այստեղ</string>
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Օգտագործեք առավելագույնը %s-ից:</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Իմանալ ավելին</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1016,16 +1030,16 @@
|
|||
<!-- text for the toolbar position card header
|
||||
In English this is an idiom for "choose a side as in an argument or fight"
|
||||
but it is ok to make this more literally about "choosing a position in a physical space -->
|
||||
<string name="onboarding_toolbar_position_header">Դիրքորոշեք</string>
|
||||
<string name="onboarding_toolbar_position_header">Դիրքորոշել</string>
|
||||
<!-- text for the toolbar position card description -->
|
||||
<string name="onboarding_toolbar_position_description">Փորձեք մի ձեռքով դիտարկումը գործիքագոտու ներքևում կամ այն տեղափոխել վերև:</string>
|
||||
<string name="onboarding_toolbar_position_description">Փորձեք մի ձեռքով դիտարկումը գործիքագոտու ներքևում կամ այն տեղափոխեք վերև:</string>
|
||||
<!-- text for the private browsing onboarding card header -->
|
||||
<string name="onboarding_private_browsing_header">Դիտարկեք գաղտնի</string>
|
||||
<string name="onboarding_private_browsing_header">Դիտարկել գաղտնի</string>
|
||||
<!-- text for the private browsing onboarding card description
|
||||
The first parameter is an icon that represents private browsing -->
|
||||
<string name="onboarding_private_browsing_description1">Մեկ անգամ բացել գաղտնի ներդիր. Հպեք %s պատկերակին:</string>
|
||||
<string name="onboarding_private_browsing_description1">Ցանկանում եք բացել գաղտնի ներդիր, հպեք %s պատկերակին:</string>
|
||||
<!-- text for the private browsing onboarding card description, explaining how to always using private browsing -->
|
||||
<string name="onboarding_private_browsing_always_description">Ամեն անգամ բացել գաղտնի ներդիրները. Թարմացրեք ձեր գաղտնի դիտարկման կարգավորումները:</string>
|
||||
<string name="onboarding_private_browsing_always_description">Ցանկանում եք ամեն անգամ բացել գաղտնի ներդիրները. Թարմացրեք գաղտնի դիտարկման կարգավորումները:</string>
|
||||
<!-- text for the private browsing onbording card button, that launches settings -->
|
||||
<string name="onboarding_private_browsing_button">Բացել կարգավորումները</string>
|
||||
<!-- text for the privacy notice onboarding card header -->
|
||||
|
@ -1033,8 +1047,8 @@
|
|||
|
||||
<!-- text for the privacy notice onboarding card description
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<string name="onboarding_privacy_notice_description">Մենք պատրաստել ենք %s-ը, որպեսզի տանք Ձեզ հսկողություն սահմանելու այն ամենի նկատմամբ, ինչ որ համօգտագործում եք
|
||||
առցանց և այն, ինչ դուք համօգտագործում եք մեզ հետ:</string>
|
||||
<string name="onboarding_privacy_notice_description">Մենք պատրաստել ենք %s-ը, որպեսզի Ձեզ տանք հսկողություն սահմանելը այն ամենի նկատմամբ, ինչ որ համօգտագործում եք
|
||||
առցանց և մեզ հետ:</string>
|
||||
<!-- Text for the button to read the privacy notice -->
|
||||
<string name="onboarding_privacy_notice_read_button">Կարդացեք մեր գաղտնիության ծանուցումը</string>
|
||||
|
||||
|
@ -1075,7 +1089,7 @@
|
|||
<!-- Text shown for settings option for sign with pairing -->
|
||||
<string name="sign_in_with_camera">Մուտք գործեք ձեր տեսախցիկի հետ</string>
|
||||
<!-- Text shown for settings option for sign with email -->
|
||||
<string name="sign_in_with_email">Փոխարենը օգտագործեք էլ. փոստ</string>
|
||||
<string name="sign_in_with_email">Փոխարենը օգտ. էլ. փոստ</string>
|
||||
<!-- Text shown in confirmation dialog to sign out of account -->
|
||||
<string name="sign_out_confirmation_message">Firefox-ը կկանգնեցնի համաժամացումը ձեր հաշվի հետ, բայց չի ջնջվի այս սարքում ձեր դիտարկման որևէ տվյալ։</string>
|
||||
<!-- Text shown in confirmation dialog to sign out of account. The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
|
@ -1095,7 +1109,7 @@
|
|||
<!-- Title for the description of enhanced tracking protection -->
|
||||
<string name="preference_enhanced_tracking_protection_explanation_title">Դիտարկեք առանց Ձեզ հետևելու</string>
|
||||
<!-- Description of enhanced tracking protection. The first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="preference_enhanced_tracking_protection_explanation">Ձեր տվյալները պահեք ձեզ մոտ: %s-ը ձեզ պաշտպանում է ամենատարածված հետագծիչներից, որոնք հետևում են այն ամենին, ինչ որ անում եք առցանց:</string>
|
||||
<string name="preference_enhanced_tracking_protection_explanation">Ձեր տվյալները պահեք ձեզ մոտ: %s-ը պաշտպանում է ամենատարածված հետագծիչներից, որոնք հետևում են այն ամենին, ինչ որ անում եք առցանց:</string>
|
||||
<!-- Text displayed that links to website about enhanced tracking protection -->
|
||||
<string name="preference_enhanced_tracking_protection_explanation_learn_more">Իմանալ ավելին</string>
|
||||
<!-- Preference for enhanced tracking protection for the standard protection settings -->
|
||||
|
@ -1253,7 +1267,7 @@
|
|||
<!-- Syncing saved logins in Fenix needs login -->
|
||||
<string name="preferences_passwords_sync_logins_sign_in">Մուտք գործեք՝ համաժամեցնելու համար</string>
|
||||
<!-- Preference to access list of saved logins -->
|
||||
<string name="preferences_passwords_saved_logins">Պահպանված մուտքաանուններ</string>
|
||||
<string name="preferences_passwords_saved_logins">Պահպանված մուտքանուններ</string>
|
||||
<!-- Description of empty list of saved passwords. Placeholder is replaced with app name. -->
|
||||
<string name="preferences_passwords_saved_logins_description_empty_text">Ձեր պահպանած կամ համաժամեցրած մուտքանունները կցուցադրվեն այստեղ:</string>
|
||||
<!-- Preference to access list of saved logins -->
|
||||
|
@ -1288,7 +1302,7 @@
|
|||
<!-- Learn more link that will link to a page with more information displayed when a connection is insecure and we detect the user is entering a password -->
|
||||
<string name="logins_insecure_connection_warning_learn_more">Իմանալ ավելին</string>
|
||||
<!-- Prompt message displayed when Fenix detects a user has entered a password and user decides if Fenix should save it. The first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="logins_doorhanger_save">Ցանկանո՞ւմ եք, որ %s-ը պահպանի այս մուտքաանունը:</string>
|
||||
<string name="logins_doorhanger_save">Ցանկանո՞ւմ եք, որ %s-ը պահպանի այս մուտքանունը:</string>
|
||||
<!-- Positive confirmation that Fenix should save the new or updated login -->
|
||||
<string name="logins_doorhanger_save_confirmation">Պահպանել</string>
|
||||
<!-- Negative confirmation that Fenix should not save the new or updated login -->
|
||||
|
@ -1354,7 +1368,7 @@
|
|||
<!-- Placeholder text shown in the Search Engine Name TextField before a user enters text -->
|
||||
<string name="search_add_custom_engine_name_hint">Անուն</string>
|
||||
<!-- Placeholder text shown in the Search String TextField before a user enters text -->
|
||||
<string name="search_add_custom_engine_search_string_hint">Որոնել տողը՝ օգտագործելու համար</string>
|
||||
<string name="search_add_custom_engine_search_string_hint">Օգտագործվող որոնման տողը </string>
|
||||
<!-- Description text for the Search String TextField. The %s is part of the string -->
|
||||
<string name="search_add_custom_engine_search_string_example">Հարցումը փոխարինել “%s”-ով: Օրինակ՝ \nhttps://www.google.com/search?q=%s</string>
|
||||
<!-- Text for the button to learn more about adding a custom search engine -->
|
||||
|
@ -1369,7 +1383,7 @@
|
|||
<!-- Text shown when a user tries to add a search engine that already exists -->
|
||||
<string name="search_add_custom_engine_error_existing_name">«%s» անունով որոնիչ արդեն գոյություն ունի:</string>
|
||||
<!-- Text shown when a user leaves the search string field empty -->
|
||||
<string name="search_add_custom_engine_error_empty_search_string">Մուտքագրել որոնման տող</string>
|
||||
<string name="search_add_custom_engine_error_empty_search_string">Մուտքագրեք որոնման տող</string>
|
||||
<!-- Text shown when a user leaves out the required template string -->
|
||||
<string name="search_add_custom_engine_error_missing_template">Ստուգեք, որ որոնման տողը համապատասխանում է օրինակի ձևաչափին</string>
|
||||
<!-- Text shown when we aren't able to validate the custom search query. The first parameter is the url of the custom search engine -->
|
||||
|
@ -1382,10 +1396,10 @@
|
|||
<string name="search_delete_search_engine_success_message">%s-ը ջնջվել է</string>
|
||||
|
||||
<!-- Title text shown for the migration screen to the new browser. Placeholder replaced with app name -->
|
||||
<string name="migration_title">Բարի գալուստ բոլորովին նոր %s</string>
|
||||
<string name="migration_title">Բարի գալուստ նոր %s</string>
|
||||
|
||||
<!-- Description text followed by a list of things migrating (e.g. Bookmarks, History). Placeholder replaced with app name-->
|
||||
<string name="migration_description">Ամբողջովին վերափոխված դիտարկիչը Ձեզ է սպասում՝ բարելավված արտադրողականությամբ և յուրահատկություններով, որոնք կօգնեն ավելին անել առցանց:\n\nԽնդրում ենք սպասել, մինչ մենք կթարմացնենք %s-ը ձեր</string>
|
||||
<string name="migration_description">Ամբողջովին վերափոխված դիտարկիչը Ձեզ է սպասում՝ բարելավված արտադրողականությամբ և յուրահատկություններով, որոնք կօգնեն անել ավելին առցանց:\n\nԽնդրում ենք սպասել, մինչ մենք կթարմացնենք %s-ի հետևյալ բաղադրիչները՝</string>
|
||||
<!-- Text on the disabled button while in progress. Placeholder replaced with app name -->
|
||||
<string name="migration_updating_app_button_text">%s-ը արդիացվում է…</string>
|
||||
<!-- Text on the enabled button. Placeholder replaced with app name-->
|
||||
|
@ -1415,7 +1429,7 @@
|
|||
<!-- Confirmation message for a dialog confirming if the user wants to set default value a permission for a site-->
|
||||
<string name="confirm_clear_permission_site">Համոզվա՞ծ եք, որ ցանկանում եք մաքրել այս թույլտվությունը այս կայքում:</string>
|
||||
<!-- label shown when there are not site exceptions to show in the site exception settings -->
|
||||
<string name="no_site_exceptions">Կայքի բացառություններ չեն</string>
|
||||
<string name="no_site_exceptions">Բացառություններ չկան</string>
|
||||
<!-- Label for the Pocket default top site -->
|
||||
<string name="pocket_top_articles">Լավագույն հոդվածներ</string>
|
||||
<!-- Bookmark deletion confirmation -->
|
||||
|
@ -1430,7 +1444,7 @@
|
|||
<!-- Login overflow menu edit button -->
|
||||
<string name="login_menu_edit_button">Խմբագրել</string>
|
||||
<!-- Message in delete confirmation dialog for logins -->
|
||||
<string name="login_deletion_confirmation">Համոզվա՞ծ եք, որ ցանկանում եք ջնջել այս մուտքագրումը:</string>
|
||||
<string name="login_deletion_confirmation">Համոզվա՞ծ եք, որ ցանկանում եք ջնջել այս մուտքանունը:</string>
|
||||
<!-- Positive action of a dialog asking to delete -->
|
||||
<string name="dialog_delete_positive">Ջնջել</string>
|
||||
<!-- The saved login options menu description. -->
|
||||
|
@ -1455,7 +1469,7 @@
|
|||
<string name="voice_search_explainer">Խոսել</string>
|
||||
|
||||
<!-- The error message in edit login view when a duplicate username exists. -->
|
||||
<string name="saved_login_duplicate">Այդ անունով մուտքագրում արդեն գոյություն ունի</string>
|
||||
<string name="saved_login_duplicate">Այդ անունով մուտքանուն արդեն գոյություն ունի</string>
|
||||
|
||||
<!-- Synced Tabs -->
|
||||
<!-- Text displayed to ask user to connect another device as no devices found with account -->
|
||||
|
@ -1472,6 +1486,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Մուտք գործեք՝ համաժամեցնելու համար</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Չկան բացված ներդիրներ</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Լավագույն կայքերի ցանկը լրացել է</string>
|
||||
|
|
|
@ -1061,7 +1061,7 @@
|
|||
<string name="onboarding_tracking_protection_header_2">자동 개인정보 보호</string>
|
||||
<!-- text for the tracking protection card description
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<string name="onboarding_tracking_protection_description_2">개인 정보 및 보안 설정은 추적기, 멀웨어 및 사용자를 따라다니는 회사를 차단합니다.</string>
|
||||
<string name="onboarding_tracking_protection_description_2">개인 정보 및 보안 설정은 추적기, 악성 코드 및 사용자를 따라다니는 회사를 차단합니다.</string>
|
||||
<!-- text for tracking protection radio button option for standard level of blocking -->
|
||||
<string name="onboarding_tracking_protection_standard_button_2">표준 (기본값)</string>
|
||||
<!-- text for standard blocking option button description -->
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
<string name="tab_tray_item_unselected_multiselect_content_description">%1$s deseleccionat</string>
|
||||
<!-- Content description announcement when exiting multiselect mode in tab tray -->
|
||||
<string name="tab_tray_exit_multiselect_content_description">Sortida del mòde seleccion multipla</string>
|
||||
<!-- Content description announcement when entering multiselect mode in tab tray -->
|
||||
<string name="tab_tray_enter_multiselect_content_description">Mòde de seleccion multipla activat, seleccionatz los onglets d’enregistrar dins una colleccion</string>
|
||||
<!-- Content description on checkmark while tab is selected in multiselect mode in tab tray -->
|
||||
<string name="tab_tray_multiselect_selected_content_description">Seleccionat</string>
|
||||
|
||||
|
@ -382,8 +384,12 @@
|
|||
<string name="preferences_telemetry">Telemetria</string>
|
||||
<!-- Preference switch for usage and technical data collection -->
|
||||
<string name="preference_usage_data">Donadas tecnicas e d’utilizacion</string>
|
||||
<!-- Preference description for usage and technical data collection -->
|
||||
<string name="preferences_usage_data_description">Parteja d’informacions sus las performàncias, lo material, l’utilizacion e las personalizacions a Mozilla per nos ajudar a melhorar %1$s</string>
|
||||
<!-- Preference switch for marketing data collection -->
|
||||
<string name="preferences_marketing_data">Donadas marketing</string>
|
||||
<!-- Preference description for marketing data collection, parameter is the app name (e.g. Firefox) -->
|
||||
<string name="preferences_marketing_data_description">Parteja de donadas sus las foncionalitats qu’utilizatz amb Leanplum, nòstre provesidor de marketing mobil.</string>
|
||||
<!-- Title for experiments preferences -->
|
||||
<string name="preference_experiments">Experimentacions</string>
|
||||
|
||||
|
@ -744,6 +750,8 @@
|
|||
<string name="collection_menu_button_content_description">Menú de colleccion</string>
|
||||
<!-- No Open Tabs Message Header -->
|
||||
<string name="no_collections_header1">Amassatz çò que compta per vos</string>
|
||||
<!-- Label to describe what collections are to a new user without any collections -->
|
||||
<string name="no_collections_description1">Agropatz de recèrcas, de sites e d’onglets similaris per i accedir rapidament mai tard.</string>
|
||||
<!-- Title for the "select tabs" step of the collection creator -->
|
||||
<string name="create_collection_select_tabs">Seleccionar d’onglets</string>
|
||||
<!-- Title for the "select collection" step of the collection creator -->
|
||||
|
@ -807,6 +815,8 @@
|
|||
<string name="sync_offline">Fòra linha</string>
|
||||
<!-- An option to connect additional devices -->
|
||||
<string name="sync_connect_device">Connectar un periferic mai</string>
|
||||
<!-- The dialog text shown when additional devices are not available -->
|
||||
<string name="sync_connect_device_dialog">Per enviar un onglet, connectatz-vos a vòstre compte Firefox sus almens un autre periferic.</string>
|
||||
<!-- Confirmation dialog button -->
|
||||
<string name="sync_confirmation_button">Comprés !</string>
|
||||
<!-- Share error message -->
|
||||
|
@ -988,6 +998,8 @@
|
|||
<string name="onboarding_firefox_account_sync_is_on">Sincro. activada</string>
|
||||
<!-- text to display in the snackbar if automatic sign-in fails. user may try again -->
|
||||
<string name="onboarding_firefox_account_automatic_signin_failed">Fracàs de connexion</string>
|
||||
<!-- text for the tracking protection onboarding card header -->
|
||||
<string name="onboarding_tracking_protection_header_2">Confidencialitat automatica</string>
|
||||
<!-- text for the tracking protection card description
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<string name="onboarding_tracking_protection_description_2">Los paramètres de confidencialitat e de seguretat blocan los traçadors, los logicials malvolents e las entrepresas que vos pistan.</string>
|
||||
|
@ -1023,6 +1035,8 @@
|
|||
<!-- Onboarding theme -->
|
||||
<!-- text for the theme picker onboarding card header -->
|
||||
<string name="onboarding_theme_picker_header">Causissètz vòstre tèma</string>
|
||||
<!-- text for the theme picker onboarding card description -->
|
||||
<string name="onboarding_theme_picker_description1">Estalviatz la batariá e vòstra vista en activant lo mòde fosc.</string>
|
||||
<!-- Automatic theme setting (will follow device setting) -->
|
||||
<string name="onboarding_theme_automatic_title">Automatic</string>
|
||||
<!-- Summary of automatic theme setting (will follow device setting) -->
|
||||
|
@ -1156,6 +1170,8 @@
|
|||
|
||||
<!-- About page link text to list of past crashes (like about:crashes on desktop) -->
|
||||
<string name="about_crashes">Plantatges</string>
|
||||
<!-- About page link text to open know your rights link -->
|
||||
<string name="about_know_your_rights">Vòstres dreches</string>
|
||||
<!-- About page link text to open licensing information link -->
|
||||
<string name="about_licensing_information">Entresenhas sus la licéncia</string>
|
||||
|
||||
|
|
|
@ -303,6 +303,9 @@
|
|||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Supplements</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Communicaziuns</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Sincronisar ussa</string>
|
||||
|
@ -569,6 +572,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">Nagina cronologia</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Naginas telechargiadas disponiblas</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">%1$d tschernidas</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Perstgisa. %1$s na po betg chargiar questa pagina.</string>
|
||||
|
@ -975,9 +985,10 @@
|
|||
<string name="onboarding_whats_new_description">Has ti dumondas areguard il nov %s? Vuls savair tge ch\'è sa midà?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Qua datti respostas</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Rablar ora il maximum da %s.</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Ulteriuras infurmaziuns</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1476,6 +1487,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">S\'annunziar tar Sync</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Nagins tabs averts</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Cuntanschì la limita da paginas preferidas</string>
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
<!-- Preference linking to help about Fenix -->
|
||||
<string name="preferences_help">Справка</string>
|
||||
<!-- Preference link to rating Fenix on the Play Store -->
|
||||
<string name="preferences_rate">Оценить на Google Play</string>
|
||||
<string name="preferences_rate">Оценить в Google Play</string>
|
||||
<!-- Preference for giving feedback about Fenix -->
|
||||
<string name="preferences_feedback">Оставить отзыв</string>
|
||||
<!-- Preference linking to about page for Fenix
|
||||
|
@ -316,6 +316,9 @@
|
|||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Дополнения</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Уведомления</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Синхронизировать</string>
|
||||
|
@ -587,6 +590,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">История отсутствует</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Здесь ещё нет загрузок</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">Выбрано: %1$d</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Извините, %1$s не смог загрузить эту страницу.</string>
|
||||
|
@ -1013,9 +1023,10 @@
|
|||
<string name="onboarding_whats_new_description">Есть вопросы о переработанном %s? Хотите узнать, что изменилось?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Получите ответы здесь</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Получите максимум от %s.</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Узнать больше</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1085,11 +1096,11 @@
|
|||
<!-- text for the theme picker onboarding card description -->
|
||||
<string name="onboarding_theme_picker_description1">Сохраните заряд аккумулятора и ваше зрение, включив тёмную тему.</string>
|
||||
<!-- Automatic theme setting (will follow device setting) -->
|
||||
<string name="onboarding_theme_automatic_title">Автоматически</string>
|
||||
<string name="onboarding_theme_automatic_title">Автоматическая</string>
|
||||
<!-- Summary of automatic theme setting (will follow device setting) -->
|
||||
<string name="onboarding_theme_automatic_summary">Адаптируется к настройкам вашего устройства</string>
|
||||
<!-- Theme setting for dark mode -->
|
||||
<string name="onboarding_theme_dark_title">Темная тема</string>
|
||||
<string name="onboarding_theme_dark_title">Тёмная тема</string>
|
||||
<!-- Theme setting for light mode -->
|
||||
<string name="onboarding_theme_light_title">Светлая тема</string>
|
||||
|
||||
|
@ -1503,6 +1514,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Войти в Синхронизацию</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Нет открытых вкладок</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Достигнут лимит топа сайтов</string>
|
||||
|
|
|
@ -306,6 +306,9 @@
|
|||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Додаци</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Обавештења</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Синхронизуј сада</string>
|
||||
|
@ -574,6 +577,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">Овде нема историјата</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Овде нема преузимања</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">Изабрано %1$d</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Нажалост, %1$s не може учитати ту страницу.</string>
|
||||
|
@ -981,9 +991,10 @@
|
|||
<string name="onboarding_whats_new_description">Имате питање о новом дизајну апликације %s? Желите ли да знате шта је промењено?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Овде потражите одговоре</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Искористите %s у потпуности.</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Сазнајте више</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1478,6 +1489,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Пријавите се на Sync</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Нема отворених језичака</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Достигнуто је ограничење популарних страница</string>
|
||||
|
|
|
@ -308,6 +308,9 @@
|
|||
<!-- Preference for add_ons -->
|
||||
<string name="preferences_addons">Émbohan</string>
|
||||
|
||||
<!-- Preference for notifications -->
|
||||
<string name="preferences_notifications">Iber</string>
|
||||
|
||||
<!-- Account Preferences -->
|
||||
<!-- Preference for triggering sync -->
|
||||
<string name="preferences_sync_now">Singkronkeun ayeuna</string>
|
||||
|
@ -578,6 +581,13 @@
|
|||
<!-- Text shown when no history exists -->
|
||||
<string name="history_empty_message">Teu aya jujutan di dieu</string>
|
||||
|
||||
<!-- Downloads -->
|
||||
<!-- Text shown when no download exists -->
|
||||
<string name="download_empty_message">Taya undeuran di dieu</string>
|
||||
<!-- History multi select title in app bar
|
||||
The first parameter is the number of downloads selected -->
|
||||
<string name="download_multi_select_title">%1$d dipilih</string>
|
||||
|
||||
<!-- Crashes -->
|
||||
<!-- Title text displayed on the tab crash page. This first parameter is the name of the application (For example: Fenix) -->
|
||||
<string name="tab_crash_title_2">Hampura. %1$s teu tiasa nyungsi ieu kaca.</string>
|
||||
|
@ -989,9 +999,10 @@
|
|||
<string name="onboarding_whats_new_description">Boga patalekan ngeunaan rarancang anyar %s? Hoyong uninga naon anu robah?</string>
|
||||
<!-- text for underlined clickable link that is part of "what's new" onboarding card description that links to an FAQ -->
|
||||
<string name="onboarding_whats_new_description_linktext">Kéngingkeun waleran di dieu</string>
|
||||
<!-- text for the firefox account onboarding card header
|
||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||
<!-- text for the firefox account onboarding card header -->
|
||||
<string name="onboarding_firefox_account_header">Maksimalkeun %s.</string>
|
||||
<!-- Text for the button to learn more about signing in to your Firefox account -->
|
||||
<string name="onboarding_manual_sign_in_learn_more">Lenyepan</string>
|
||||
<!-- text for the firefox account onboarding card header when we detect you're already signed in to
|
||||
another Firefox browser. (The word `Firefox` should not be translated)
|
||||
The first parameter is the email of the detected user's account -->
|
||||
|
@ -1486,6 +1497,9 @@
|
|||
<!-- Text displayed on a button in the synced tabs screen to link users to sign in when a user is not signed in to Firefox Sync -->
|
||||
<string name="synced_tabs_sign_in_button">Asup pikeun nyingkronkeun</string>
|
||||
|
||||
<!-- The text displayed when a synced device has no tabs to show in the list of Synced Tabs. -->
|
||||
<string name="synced_tabs_no_open_tabs">Taya tab muka</string>
|
||||
|
||||
<!-- Top Sites -->
|
||||
<!-- Title text displayed in the dialog when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_title">Wates loka top geus kahontal</string>
|
||||
|
|
|
@ -172,4 +172,5 @@
|
|||
<!-- a11y -->
|
||||
<dimen name="accessibility_min_height">48dp</dimen>
|
||||
|
||||
<dimen name="tap_increase_16">16dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -195,4 +195,6 @@
|
|||
<string name="pref_key_default_browser" translatable="false">pref_key_default_browser</string>
|
||||
|
||||
<string name="pref_key_login_exceptions" translatable="false">pref_key_login_exceptions</string>
|
||||
|
||||
<string name="pref_key_show_collections_placeholder_home" translatable="false">pref_key_show_collections_home</string>
|
||||
</resources>
|
||||
|
|
|
@ -725,10 +725,8 @@
|
|||
<string name="collections_header">Collections</string>
|
||||
<!-- Content description (not visible, for screen readers etc.): Opens the collection menu when pressed -->
|
||||
<string name="collection_menu_button_content_description">Collection menu</string>
|
||||
<!-- No Open Tabs Message Header -->
|
||||
<string name="no_collections_header1">Collect the things that matter to you</string>
|
||||
<!-- Label to describe what collections are to a new user without any collections -->
|
||||
<string name="no_collections_description1">Group together similar searches, sites, and tabs for quick access later.</string>
|
||||
<string name="no_collections_description2">Collect the things that matter to you.\nGroup together similar searches, sites, and tabs for quick access later.</string>
|
||||
<!-- Title for the "select tabs" step of the collection creator -->
|
||||
<string name="create_collection_select_tabs">Select Tabs</string>
|
||||
<!-- Title for the "select collection" step of the collection creator -->
|
||||
|
@ -1467,4 +1465,6 @@
|
|||
<!-- Confirmation dialog button text when top sites limit is reached. -->
|
||||
<string name="top_sites_max_limit_confirmation_button">OK, Got It</string>
|
||||
|
||||
<!-- Content description for close button in collection placeholder. -->
|
||||
<string name="remove_home_collection_placeholder_content_description">Remove</string>
|
||||
</resources>
|
||||
|
|
|
@ -78,8 +78,10 @@ class DefaultSessionControlControllerTest {
|
|||
collections = emptyList(),
|
||||
expandedCollections = emptySet(),
|
||||
mode = Mode.Normal,
|
||||
topSites = emptyList()
|
||||
topSites = emptyList(),
|
||||
showCollectionPlaceholder = true
|
||||
)
|
||||
|
||||
every { sessionManager.sessions } returns emptyList()
|
||||
every { navController.currentDestination } returns mockk {
|
||||
every { id } returns R.id.homeFragment
|
||||
|
@ -94,6 +96,7 @@ class DefaultSessionControlControllerTest {
|
|||
|
||||
controller = DefaultSessionControlController(
|
||||
activity = activity,
|
||||
settings = settings,
|
||||
engine = engine,
|
||||
metrics = metrics,
|
||||
sessionManager = sessionManager,
|
||||
|
@ -414,4 +417,14 @@ class DefaultSessionControlControllerTest {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun handleRemoveCollectionsPlaceholder() {
|
||||
controller.handleRemoveCollectionsPlaceholder()
|
||||
|
||||
verify {
|
||||
settings.showCollectionsPlaceholderOnHome = false
|
||||
fragmentStore.dispatch(HomeFragmentAction.RemoveCollectionsPlaceholder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import mozilla.components.feature.tab.collections.TabCollection
|
|||
import mozilla.components.feature.top.sites.TopSite
|
||||
import mozilla.components.service.fxa.manager.FxaAccountManager
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
@ -53,7 +54,8 @@ class HomeFragmentStoreTest {
|
|||
collections = emptyList(),
|
||||
expandedCollections = emptySet(),
|
||||
mode = currentMode.getCurrentMode(),
|
||||
topSites = emptyList()
|
||||
topSites = emptyList(),
|
||||
showCollectionPlaceholder = true
|
||||
)
|
||||
|
||||
homeFragmentStore = HomeFragmentStore(homeFragmentState)
|
||||
|
@ -95,6 +97,15 @@ class HomeFragmentStoreTest {
|
|||
assertEquals(topSites, homeFragmentStore.state.topSites)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Test changing hiding collections placeholder`() = runBlocking {
|
||||
assertTrue(homeFragmentStore.state.showCollectionPlaceholder)
|
||||
|
||||
homeFragmentStore.dispatch(HomeFragmentAction.RemoveCollectionsPlaceholder).join()
|
||||
|
||||
assertFalse(homeFragmentStore.state.showCollectionPlaceholder)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Test changing the expanded collections in HomeFragmentStore`() = runBlocking {
|
||||
val collection: TabCollection = mockk<TabCollection>().apply {
|
||||
|
@ -110,25 +121,27 @@ class HomeFragmentStoreTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun `Test changing the collections, mode and top sites in the HomeFragmentStore`() = runBlocking {
|
||||
// Verify that the default state of the HomeFragment is correct.
|
||||
assertEquals(0, homeFragmentStore.state.collections.size)
|
||||
assertEquals(0, homeFragmentStore.state.topSites.size)
|
||||
assertEquals(Mode.Normal, homeFragmentStore.state.mode)
|
||||
fun `Test changing the collections, mode and top sites in the HomeFragmentStore`() =
|
||||
runBlocking {
|
||||
// Verify that the default state of the HomeFragment is correct.
|
||||
assertEquals(0, homeFragmentStore.state.collections.size)
|
||||
assertEquals(0, homeFragmentStore.state.topSites.size)
|
||||
assertEquals(Mode.Normal, homeFragmentStore.state.mode)
|
||||
|
||||
val collections: List<TabCollection> = listOf(mockk())
|
||||
val topSites: List<TopSite> = listOf(mockk(), mockk())
|
||||
val collections: List<TabCollection> = listOf(mockk())
|
||||
val topSites: List<TopSite> = listOf(mockk(), mockk())
|
||||
|
||||
homeFragmentStore.dispatch(
|
||||
HomeFragmentAction.Change(
|
||||
collections = collections,
|
||||
mode = Mode.Private,
|
||||
topSites = topSites
|
||||
)
|
||||
).join()
|
||||
homeFragmentStore.dispatch(
|
||||
HomeFragmentAction.Change(
|
||||
collections = collections,
|
||||
mode = Mode.Private,
|
||||
topSites = topSites,
|
||||
showCollectionPlaceholder = true
|
||||
)
|
||||
).join()
|
||||
|
||||
assertEquals(1, homeFragmentStore.state.collections.size)
|
||||
assertEquals(Mode.Private, homeFragmentStore.state.mode)
|
||||
assertEquals(2, homeFragmentStore.state.topSites.size)
|
||||
}
|
||||
assertEquals(1, homeFragmentStore.state.collections.size)
|
||||
assertEquals(Mode.Private, homeFragmentStore.state.mode)
|
||||
assertEquals(2, homeFragmentStore.state.topSites.size)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,4 +110,10 @@ class SessionControlInteractorTest {
|
|||
interactor.onPasteAndGo("text")
|
||||
verify { controller.handlePasteAndGo("text") }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun onRemoveCollectionsPlaceholder() {
|
||||
interactor.onRemoveCollectionsPlaceholder()
|
||||
verify { controller.handleRemoveCollectionsPlaceholder() }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,13 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import kotlinx.android.synthetic.main.no_collections_message.view.*
|
||||
import mozilla.components.browser.state.state.BrowserState
|
||||
import mozilla.components.browser.state.state.createTab
|
||||
import mozilla.components.browser.state.store.BrowserStore
|
||||
import mozilla.components.support.test.robolectric.testContext
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
|
@ -25,6 +29,14 @@ import org.mozilla.fenix.home.sessioncontrol.CollectionInteractor
|
|||
class NoCollectionsMessageViewHolderTest {
|
||||
|
||||
private lateinit var view: View
|
||||
private val store: BrowserStore = BrowserStore(
|
||||
initialState = BrowserState(
|
||||
listOf(
|
||||
createTab("https://www.mozilla.org", id = "reader-inactive-tab")
|
||||
)
|
||||
)
|
||||
)
|
||||
private lateinit var lifecycleOwner: LifecycleOwner
|
||||
private lateinit var interactor: CollectionInteractor
|
||||
|
||||
@Before
|
||||
|
@ -32,28 +44,40 @@ class NoCollectionsMessageViewHolderTest {
|
|||
val appCompatContext = ContextThemeWrapper(testContext, R.style.NormalTheme)
|
||||
view = LayoutInflater.from(appCompatContext)
|
||||
.inflate(NoCollectionsMessageViewHolder.LAYOUT_ID, null)
|
||||
lifecycleOwner = mockk(relaxed = true)
|
||||
interactor = mockk(relaxed = true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `hide button when hasNormalTabsOpened is false`() {
|
||||
NoCollectionsMessageViewHolder(view, interactor, hasNormalTabsOpened = false)
|
||||
fun `hide add to collection button when there are no tabs open`() {
|
||||
val noTabsStore = BrowserStore()
|
||||
NoCollectionsMessageViewHolder(view, lifecycleOwner, noTabsStore, interactor)
|
||||
|
||||
assertFalse(view.add_tabs_to_collections_button.isVisible)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `show button when hasNormalTabsOpened is true`() {
|
||||
NoCollectionsMessageViewHolder(view, interactor, hasNormalTabsOpened = true)
|
||||
fun `show add to collection button when there are tabs`() {
|
||||
NoCollectionsMessageViewHolder(view, lifecycleOwner, store, interactor)
|
||||
|
||||
assertTrue(view.add_tabs_to_collections_button.isVisible)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `call interactor on click`() {
|
||||
NoCollectionsMessageViewHolder(view, interactor, hasNormalTabsOpened = true)
|
||||
NoCollectionsMessageViewHolder(view, lifecycleOwner, store, interactor)
|
||||
|
||||
view.add_tabs_to_collections_button.performClick()
|
||||
verify { interactor.onAddTabsToCollectionTapped() }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `hide view and change setting on remove placeholder click`() {
|
||||
NoCollectionsMessageViewHolder(view, lifecycleOwner, store, interactor)
|
||||
|
||||
view.remove_collection_placeholder.performClick()
|
||||
verify {
|
||||
interactor.onRemoveCollectionsPlaceholder()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -289,6 +289,19 @@ class SettingsTest {
|
|||
assertFalse(settings.shouldUseTrackingProtection)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun shouldShowCollectionsPlaceholderOnHome() {
|
||||
// When
|
||||
// Then
|
||||
assertTrue(settings.showCollectionsPlaceholderOnHome)
|
||||
|
||||
// When
|
||||
settings.showCollectionsPlaceholderOnHome = false
|
||||
|
||||
// Then
|
||||
assertFalse(settings.showCollectionsPlaceholderOnHome)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun shouldSetOpenInAppOpened() {
|
||||
// When
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@ By using the Glean SDK, Fenix can send the pings the SDK owns and defines, as do
|
|||
Additional metrics or pings defined by Fenix are documented in the [Glean SDK autogenerated docs](metrics.md).
|
||||
|
||||
## Leanplum
|
||||
See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/mma.md) for details on Leanplum usage in Firefox Preview.
|
||||
See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/mma.md) for details on Leanplum usage in Firefox for Android.
|
||||
|
||||
## Crash reporting
|
||||
See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/crash-reporting.md) for details on crash reporting in Firefox Preview.
|
||||
See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/crash-reporting.md) for details on crash reporting in Firefox for Android.
|
||||
|
|
Loading…
Reference in New Issue