old_contents: import { 
    APP_INITIALIZE, 
    APP_UPDATE_STATUS, 
    APP_SET_DIALOG, 
    CHANNEL_UPDATE,
    CHANNEL_VOLUME_UPDATE,
    MESSAGE_TOGGLE_PROPERTY,
    MESSAGE_REMOVE,
  } from './constants'
  
  export function updateAppStatus(status, error) {
    return { 
      type: APP_UPDATE_STATUS, 
      error,
      status,
    }
  }
  
  export function initializeApp(data) { 
    return {
      type : APP_INITIALIZE, 
      data,
    }
  }
  
  export function toggleMessageRead(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'read',
      id,
    }
  }
  
  export function toggleMessageSelected(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'selected',
      id,
    }
  }
  
  
  export function toggleMessageFavorite(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'favorite',
      id,
    }
  }
  
  export function removeMessage(id) {
    return {
      type : MESSAGE_REMOVE, 
      id,
    }
  }
  
  export function updateChannel(id, data) {
    return {
      type : CHANNEL_UPDATE, 
      id,
      data,
    }
  }
  
  export function updateChannelVolume(id, level) {
    return {
      type : CHANNEL_VOLUME_UPDATE, 
      id,
      level,
    }
  }
  
  export function setDialog(dialog, state) {
    return {
      type : APP_SET_DIALOG,
      dialog,
      state,
    }
  }
  
new_contents: import { 
    APP_INITIALIZE, 
    APP_SET_DIALOG, 
    APP_UPDATE_STATUS, 
    CHANNEL_UPDATE,
    CHANNEL_VOLUME_UPDATE,
    MESSAGE_MARK_ALL_READ,
    MESSAGE_REMOVE,
    MESSAGE_TOGGLE_PROPERTY,
  } from './constants'
  
  export function updateAppStatus(status, error) {
    return { 
      type: APP_UPDATE_STATUS, 
      error,
      status,
    }
  }
  
  export function initializeApp(data) { 
    return {
      type : APP_INITIALIZE, 
      data,
    }
  }
  
  export function toggleMessageRead(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'read',
      id,
    }
  }
  
  export function markAllMessagesRead() {
    return {
      type     : MESSAGE_MARK_ALL_READ, 
    }
  }
  
  export function toggleMessageSelected(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'selected',
      id,
    }
  }
  
  
  export function toggleMessageFavorite(id) {
    return {
      type     : MESSAGE_TOGGLE_PROPERTY, 
      property : 'favorite',
      id,
    }
  }
  
  export function removeMessage(id) {
    return {
      type : MESSAGE_REMOVE, 
      id,
    }
  }
  
  export function updateChannel(id, data) {
    return {
      type : CHANNEL_UPDATE, 
      id,
      data,
    }
  }
  
  export function updateChannelVolume(id, level) {
    return {
      type : CHANNEL_VOLUME_UPDATE, 
      id,
      level,
    }
  }
  
  export function setDialog(dialog, state) {
    return {
      type : APP_SET_DIALOG,
      dialog,
      state,
    }
  }
  
subject: create action to mark all messages read