renaming one adapter to make it clearer

This commit is contained in:
tibbi 2022-03-18 19:07:40 +01:00
parent ec33024589
commit 2516b27746
2 changed files with 5 additions and 5 deletions

View File

@ -12,8 +12,8 @@ import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import kotlinx.android.synthetic.main.item_add_app_launcher.view.* import kotlinx.android.synthetic.main.item_add_app_launcher.view.*
import java.util.* import java.util.*
class LaunchersDialogAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) : class AddLaunchersAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) :
RecyclerView.Adapter<LaunchersDialogAdapter.ViewHolder>() { RecyclerView.Adapter<AddLaunchersAdapter.ViewHolder>() {
private val config = activity.config private val config = activity.config
private var textColor = config.textColor private var textColor = config.textColor
private var adjustedPrimaryColor = activity.getAdjustedPrimaryColor() private var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()

View File

@ -4,7 +4,7 @@ import android.app.Activity
import android.view.ViewGroup import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.applauncher.R import com.simplemobiletools.applauncher.R
import com.simplemobiletools.applauncher.adapters.LaunchersDialogAdapter import com.simplemobiletools.applauncher.adapters.AddLaunchersAdapter
import com.simplemobiletools.applauncher.extensions.dbHelper import com.simplemobiletools.applauncher.extensions.dbHelper
import com.simplemobiletools.applauncher.models.AppLauncher import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled
@ -18,7 +18,7 @@ class AddAppLauncherDialog(
val callback: () -> Unit val callback: () -> Unit
) { ) {
private var view = (activity.layoutInflater.inflate(R.layout.dialog_pick_launchers, null) as ViewGroup) private var view = (activity.layoutInflater.inflate(R.layout.dialog_pick_launchers, null) as ViewGroup)
private var adapter: LaunchersDialogAdapter? = null private var adapter: AddLaunchersAdapter? = null
init { init {
AlertDialog.Builder(activity) AlertDialog.Builder(activity)
@ -26,7 +26,7 @@ class AddAppLauncherDialog(
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)
.create().apply { .create().apply {
activity.setupDialogStuff(view, this) { activity.setupDialogStuff(view, this) {
adapter = LaunchersDialogAdapter(activity, allLaunchers, shownLaunchers) adapter = AddLaunchersAdapter(activity, allLaunchers, shownLaunchers)
view.pick_launchers_holder.adapter = adapter view.pick_launchers_holder.adapter = adapter
if (activity.areSystemAnimationsEnabled) { if (activity.areSystemAnimationsEnabled) {