<commit_before>package com.zeyad.rxredux.core.view

import android.arch.lifecycle.Observer
import com.zeyad.rxredux.core.SuccessState

class PStateObserver<V : BaseView<S, *>, S>(private val view: V) : Observer<SuccessState<S>> {
    override fun onChanged(uiModel: SuccessState<S>?) {
        uiModel?.apply {
            view.toggleViews(false, event)
            view.setState(bundle)
            view.renderSuccessState(bundle)
        }
    }
}<commit_msg>StateObserver is setting the state before toggling the views and rendering the success state<commit_after>package com.zeyad.rxredux.core.view

import android.arch.lifecycle.Observer
import com.zeyad.rxredux.core.SuccessState

class PStateObserver<V : BaseView<S, *>, S>(private val view: V) : Observer<SuccessState<S>> {
    override fun onChanged(uiModel: SuccessState<S>?) {
        uiModel?.apply {
            view.setState(bundle)
            view.toggleViews(false, event)
            view.renderSuccessState(bundle)
        }
    }
}
{'fraction_non_alphanumeric': 0.10789210789210789, 'fraction_numerical': 0.0, 'mean_word_length': 3.356521739130435, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1564168', 'n_tokens_mistral': 304, 'n_tokens_neox': 303, 'n_words': 59}