You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
917 B
Kotlin
29 lines
917 B
Kotlin
5 years ago
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||
5 years ago
|
* 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/. */
|
||
5 years ago
|
|
||
4 years ago
|
package org.mozilla.fenix.loginexceptions.viewholders
|
||
5 years ago
|
|
||
|
import android.view.View
|
||
|
import androidx.recyclerview.widget.RecyclerView
|
||
|
import kotlinx.android.synthetic.main.delete_exceptions_button.view.*
|
||
|
import org.mozilla.fenix.R
|
||
4 years ago
|
import org.mozilla.fenix.loginexceptions.LoginExceptionsInteractor
|
||
5 years ago
|
|
||
4 years ago
|
class LoginExceptionsDeleteButtonViewHolder(
|
||
5 years ago
|
view: View,
|
||
4 years ago
|
private val interactor: LoginExceptionsInteractor
|
||
5 years ago
|
) : RecyclerView.ViewHolder(view) {
|
||
|
private val deleteButton = view.removeAllExceptions
|
||
|
|
||
|
init {
|
||
|
deleteButton.setOnClickListener {
|
||
5 years ago
|
interactor.onDeleteAll()
|
||
5 years ago
|
}
|
||
|
}
|
||
|
|
||
|
companion object {
|
||
4 years ago
|
const val LAYOUT_ID = R.layout.delete_logins_exceptions_button
|
||
5 years ago
|
}
|
||
|
}
|