<commit_before>package com.handstandsam.shoppingapp.features.checkout

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import androidx.appcompat.widget.AppCompatImageView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.handstandsam.shoppingapp.MyApplication
import com.handstandsam.shoppingapp.R
import com.handstandsam.shoppingapp.cart.ShoppingCart
import com.handstandsam.shoppingapp.features.home.ColorInts
import com.handstandsam.shoppingapp.features.itemdetail.ItemDetailActivity
import com.handstandsam.shoppingapp.features.itemdetail.ItemDetailPresenter
import com.handstandsam.shoppingapp.models.ItemWithQuantity
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch


internal class CheckoutItemRowViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
    CoroutineScope by CoroutineScope(Dispatchers.Default) {

    private val textView: TextView = itemView.findViewById(R.id.text)

    private val imageView: AppCompatImageView = itemView.findViewById(R.id.image)
    private val addButton: AppCompatImageView = itemView.findViewById(R.id.add_button)
    private val removeButton: AppCompatImageView = itemView.findViewById(R.id.remove_button)

    private val shoppingCart: ShoppingCart
        get() {
            val application = (itemView.context.applicationContext as MyApplication)
            return application.appGraph.sessionGraph.shoppingCart
        }

    private var _itemWithQuantity: ItemWithQuantity? = null

    init {<commit_msg>Should be using `graph()` instead.<commit_after>package com.handstandsam.shoppingapp.features.checkout

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import androidx.appcompat.widget.AppCompatImageView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.handstandsam.shoppingapp.MyApplication
import com.handstandsam.shoppingapp.R
import com.handstandsam.shoppingapp.cart.ShoppingCart
import com.handstandsam.shoppingapp.features.home.ColorInts
import com.handstandsam.shoppingapp.features.itemdetail.ItemDetailActivity
import com.handstandsam.shoppingapp.features.itemdetail.ItemDetailPresenter
import com.handstandsam.shoppingapp.graph
import com.handstandsam.shoppingapp.models.ItemWithQuantity
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch


internal class CheckoutItemRowViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
    CoroutineScope by CoroutineScope(Dispatchers.Default) {

    private val textView: TextView = itemView.findViewById(R.id.text)

    private val imageView: AppCompatImageView = itemView.findViewById(R.id.image)
    private val addButton: AppCompatImageView = itemView.findViewById(R.id.add_button)
    private val removeButton: AppCompatImageView = itemView.findViewById(R.id.remove_button)

    private val shoppingCart: ShoppingCart
        get() {
            val application = (itemView.context.applicationContext as MyApplication)
            return application.graph().sessionGraph.shoppingCart
        }

    private var _itemWithQuantity: ItemWithQuantity? = null

    init {
{'fraction_non_alphanumeric': 0.07262905162064826, 'fraction_numerical': 0.0, 'mean_word_length': 5.6, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5330284', 'n_tokens_mistral': 968, 'n_tokens_neox': 957, 'n_words': 170}