client/src/actions/syncActions.js
author ymh <ymh.work@gmail.com>
Sun, 30 Jul 2017 01:02:09 +0200
changeset 130 78246db1cbac
parent 129 d48946d164c6
permissions -rw-r--r--
make synchronization recurent, improve synchronization status display
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
129
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import * as types from '../constants/actionTypes';
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
export const updateLastSync = (timestamp) => {
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
  return {
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    type: types.SYNC_SET_LAST_SYNC,
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
    value: timestamp
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
  }
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
}
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
export const endSynchronize = () => {
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
  return {
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    type: types.SYNC_END_SYNC
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
  }
d48946d164c6 Add a first version of synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
}
130
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    15
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    16
export const startSynchronize = () => {
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    17
  return {
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    18
    type: types.SYNC_START_SYNC
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    19
  }
78246db1cbac make synchronization recurent, improve synchronization status display
ymh <ymh.work@gmail.com>
parents: 129
diff changeset
    20
}