2019-05-16 07:56:13 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2019-07-12 20:38:15 +02:00
|
|
|
* 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/. */
|
2019-05-16 07:56:13 +02:00
|
|
|
|
|
|
|
package org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding
|
|
|
|
|
|
|
|
import android.view.View
|
|
|
|
import androidx.recyclerview.widget.RecyclerView
|
|
|
|
import kotlinx.android.synthetic.main.onboarding_finish.view.*
|
|
|
|
import org.mozilla.fenix.R
|
2020-06-25 20:21:31 +02:00
|
|
|
import org.mozilla.fenix.components.metrics.Event
|
|
|
|
import org.mozilla.fenix.ext.components
|
2019-12-05 04:06:05 +01:00
|
|
|
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
2019-05-16 07:56:13 +02:00
|
|
|
|
|
|
|
class OnboardingFinishViewHolder(
|
|
|
|
view: View,
|
2019-12-05 04:06:05 +01:00
|
|
|
private val interactor: OnboardingInteractor
|
2019-05-16 07:56:13 +02:00
|
|
|
) : RecyclerView.ViewHolder(view) {
|
|
|
|
|
|
|
|
init {
|
|
|
|
view.finish_button.setOnClickListener {
|
2019-12-05 04:06:05 +01:00
|
|
|
interactor.onStartBrowsingClicked()
|
2020-06-25 20:21:31 +02:00
|
|
|
it.context.components.analytics.metrics.track(Event.OnboardingFinish)
|
2019-05-16 07:56:13 +02:00
|
|
|
}
|
|
|
|
}
|
2019-06-27 01:03:06 +02:00
|
|
|
|
2019-05-16 07:56:13 +02:00
|
|
|
companion object {
|
|
|
|
const val LAYOUT_ID = R.layout.onboarding_finish
|
|
|
|
}
|
|
|
|
}
|