<commit_before>package com.ternaryop.photoshelf.adapter

import androidx.recyclerview.widget.RecyclerView

/**
 * Created by dave on 13/04/16.
 *
 * Notify changes to the adapter delegate
 */
class SelectionArrayViewHolder<T : RecyclerView.ViewHolder>(private val adapter: RecyclerView.Adapter<T>)
    : SelectionArray() {

    override fun toggle(position: Int) {
        super.toggle(position)
        adapter.notifyItemChanged(position)
    }

    override fun setSelected(position: Int, selected: Boolean) {
        super.setSelected(position, selected)
        adapter.notifyItemChanged(position)
    }

    override fun clear() {
        super.clear()
        adapter.notifyDataSetChanged()
    }

    override fun setSelectedRange(start: Int, end: Int, selected: Boolean) {
        super.setSelectedRange(start, end, selected)
        adapter.notifyDataSetChanged()
    }
}<commit_msg>fixed incorrect call to notifyDataSetChanged()<commit_after>package com.ternaryop.photoshelf.adapter

import androidx.recyclerview.widget.RecyclerView

/**
 * Created by dave on 13/04/16.
 *
 * Notify changes to the adapter delegate
 */
class SelectionArrayViewHolder<T : RecyclerView.ViewHolder>(private val adapter: RecyclerView.Adapter<T>)
    : SelectionArray() {

    override fun toggle(position: Int) {
        super.toggle(position)
        adapter.notifyItemChanged(position)
    }

    override fun setSelected(position: Int, selected: Boolean) {
        super.setSelected(position, selected)
        adapter.notifyItemChanged(position)
    }

    override fun clear() {
        for (i in selectedPositions) {
            setSelected(i, false)
        }
        super.clear()
    }

    override fun setSelectedRange(start: Int, end: Int, selected: Boolean) {
        super.setSelectedRange(start, end, selected)
        adapter.notifyDataSetChanged()
    }
}
{'fraction_non_alphanumeric': 0.09672219236969372, 'fraction_numerical': 0.006448146157979581, 'mean_word_length': 3.300230946882217, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7153504', 'n_tokens_mistral': 535, 'n_tokens_neox': 511, 'n_words': 117}