<commit_before>import * as types from '../types'
import initialState from '../initialState';
import { createReducer, mergeState } from '~/utils/redux';

export default createReducer(initialState.thread, {
	[types.THREAD_REQUESTED]: (state, action) =>
        mergeState(state, {
            isFetching: true,
            isActive: true,
            didInvalidate: false

        }),

    [types.THREAD_INVALIDATED]: (state, action) =>
        mergeState(state, {
            didInvalidate: true,
            isFetching: false
        }),

    [types.THREAD_LOADED]: (state, action) =>
        mergeState(state, {
            posts: action.posts,
            isFetching: false,
            receivedAt: action.receivedAt
        }),

    [types.THREAD_DESTROYED]: (state, action) =>
        mergeState(state, {
            posts: [],
            isActive: false,
            receivedAt: 0
        }),
<commit_msg>feat(redux): Add lastModified to the thread reducer<commit_after>import * as types from '../types'
import initialState from '../initialState';
import { createReducer, mergeState } from '~/utils/redux';

export default createReducer(initialState.thread, {
	[types.THREAD_REQUESTED]: (state, action) =>
        mergeState(state, {
            isFetching: true,
            isActive: true,
            didInvalidate: false

        }),

    [types.THREAD_INVALIDATED]: (state, action) =>
        mergeState(state, {
            didInvalidate: true,
            isFetching: false
        }),

    [types.THREAD_LOADED]: (state, action) =>
        mergeState(state, {
            isFetching: false,
            posts: action.payload.posts,
            receivedAt: action.payload.receivedAt,
            lastModified: action.payload.lastModified
        }),

    [types.THREAD_DESTROYED]: (state, action) =>
        mergeState(state, {
            posts: [],
            isActive: false,
            receivedAt: 0
        }),

{'fraction_non_alphanumeric': 0.11859140341791817, 'fraction_numerical': 0.0010357327809425167, 'mean_word_length': 2.0912, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3939767', 'n_tokens_mistral': 547, 'n_tokens_neox': 530, 'n_words': 116}