Loading app/src/main/java/org/mozilla/fenix/components/metrics/Metrics.kt +3 −2 Original line number Diff line number Diff line Loading @@ -236,9 +236,10 @@ sealed class Event { ) } data class LibrarySelectedItem(val item: String) : Event() { data class LibrarySelectedItem(val item: LibraryItem) : Event() { enum class LibraryItem { BOOKMARKS, HISTORY } override val extras: Map<Library.selectedItemKeys, String>? get() = mapOf(Library.selectedItemKeys.item to item) get() = mapOf(Library.selectedItemKeys.item to item.name) } data class ErrorPageVisited(val errorType: ErrorType) : Event() { Loading app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt +2 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class LibraryFragment : Fragment(R.layout.fragment_library) { libraryHistory.setOnClickListener { requireComponents.analytics.metrics .track(Event.LibrarySelectedItem(view.context.getString(R.string.library_history))) .track(Event.LibrarySelectedItem(Event.LibrarySelectedItem.LibraryItem.HISTORY)) nav( R.id.libraryFragment, LibraryFragmentDirections.actionLibraryFragmentToHistoryFragment() Loading @@ -50,7 +50,7 @@ class LibraryFragment : Fragment(R.layout.fragment_library) { libraryBookmarks.setOnClickListener { requireComponents.analytics.metrics .track(Event.LibrarySelectedItem(view.context.getString(R.string.library_bookmarks))) .track(Event.LibrarySelectedItem(Event.LibrarySelectedItem.LibraryItem.BOOKMARKS)) nav( R.id.libraryFragment, LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Mobile.id) Loading Loading
app/src/main/java/org/mozilla/fenix/components/metrics/Metrics.kt +3 −2 Original line number Diff line number Diff line Loading @@ -236,9 +236,10 @@ sealed class Event { ) } data class LibrarySelectedItem(val item: String) : Event() { data class LibrarySelectedItem(val item: LibraryItem) : Event() { enum class LibraryItem { BOOKMARKS, HISTORY } override val extras: Map<Library.selectedItemKeys, String>? get() = mapOf(Library.selectedItemKeys.item to item) get() = mapOf(Library.selectedItemKeys.item to item.name) } data class ErrorPageVisited(val errorType: ErrorType) : Event() { Loading
app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt +2 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class LibraryFragment : Fragment(R.layout.fragment_library) { libraryHistory.setOnClickListener { requireComponents.analytics.metrics .track(Event.LibrarySelectedItem(view.context.getString(R.string.library_history))) .track(Event.LibrarySelectedItem(Event.LibrarySelectedItem.LibraryItem.HISTORY)) nav( R.id.libraryFragment, LibraryFragmentDirections.actionLibraryFragmentToHistoryFragment() Loading @@ -50,7 +50,7 @@ class LibraryFragment : Fragment(R.layout.fragment_library) { libraryBookmarks.setOnClickListener { requireComponents.analytics.metrics .track(Event.LibrarySelectedItem(view.context.getString(R.string.library_bookmarks))) .track(Event.LibrarySelectedItem(Event.LibrarySelectedItem.LibraryItem.BOOKMARKS)) nav( R.id.libraryFragment, LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Mobile.id) Loading