<commit_before>import initialState from '../initialState';
import {
    APP_READY,
    HEADER_TOGGLED,
    DRAWER_TOGGLED,
    NAVBAR_TOGGLED,
    HEADER_PANEL_OPENED,
    THREAD_REQUESTED,
    THREAD_CACHE_LOADED,
    THREAD_DESTROYED,
    HEADER_PANEL_CLOSED
} from '../types';


export default function (state = initialState.display, action) {
    switch (action.type) {

        case APP_READY:
            return Object.assign({}, state, {
                isAppReady: true
            })

        case HEADER_TOGGLED:
            return Object.assign({}, state, {
                isHeaderVisible: action.payload
            })

        case DRAWER_TOGGLED:
            return Object.assign({}, state, {
                isDrawerOpen: action.payload
            })

        case NAVBAR_TOGGLED:
            return Object.assign({}, state, {
                isNavbarOpen: action.payload
            })

        case THREAD_REQUESTED:
        case THREAD_CACHE_LOADED:
            return Object.assign({}, state, {
                isThreadOpen: true
            })

        case THREAD_DESTROYED:
            return Object.assign({}, state, {
                isThreadOpen: false
            })

        case HEADER_PANEL_OPENED:
            return Object.assign({}, state, {
                activeHeaderPanel: action.payload
            })

        case HEADER_PANEL_CLOSED:
            return Object.assign({}, state, {
                activeHeaderPanel: null
            })

        default:
            return state
    }
}<commit_msg>feat(DisplayReducer): Add USER_NAVIGATED<commit_after>import initialState from '../initialState';
import {
    APP_READY,
    HEADER_TOGGLED,
    DRAWER_TOGGLED,
    NAVBAR_TOGGLED,
    HEADER_PANEL_OPENED,
    THREAD_REQUESTED,
    THREAD_CACHE_LOADED,
    THREAD_DESTROYED,
    HEADER_PANEL_CLOSED,
    USER_NAVIGATED
} from '../types';


export default function (state = initialState.display, action) {
    switch (action.type) {

        case APP_READY:
            return Object.assign({}, state, {
                isAppReady: true
            })

        case HEADER_TOGGLED:
            return Object.assign({}, state, {
                isHeaderVisible: action.payload
            })

        case DRAWER_TOGGLED:
            return Object.assign({}, state, {
                isDrawerOpen: action.payload
            })

        case NAVBAR_TOGGLED:
            return Object.assign({}, state, {
                isNavbarOpen: action.payload
            })

        case THREAD_REQUESTED:
        case THREAD_CACHE_LOADED:
            return Object.assign({}, state, {
                isThreadOpen: true
            })

        case THREAD_DESTROYED:
            return Object.assign({}, state, {
                isThreadOpen: false
            })

        case HEADER_PANEL_OPENED:
            return Object.assign({}, state, {
                activeHeaderPanel: action.payload
            })

        case HEADER_PANEL_CLOSED:
            return Object.assign({}, state, {
                activeHeaderPanel: null
            })

        case USER_NAVIGATED:
            return Object.assign({}, state, {
                activeView: action.payload
            })

        default:
            return state
    }
}
{'fraction_non_alphanumeric': 0.08530223995090519, 'fraction_numerical': 0.0, 'mean_word_length': 1.5955414012738853, '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': '6693431', 'n_tokens_mistral': 962, 'n_tokens_neox': 906, 'n_words': 180}