2018-03-03 22:15:50 +00:00
|
|
|
import { CHAR_LIMIT } from '../../_static/statuses'
|
|
|
|
import { measureText } from '../../_utils/measureText'
|
2018-02-27 06:22:56 +00:00
|
|
|
|
|
|
|
export function statusComputations (store) {
|
2018-02-28 05:01:01 +00:00
|
|
|
store.compute('rawComposeTextLength',
|
|
|
|
['rawComposeText'],
|
2018-02-28 07:38:33 +00:00
|
|
|
(rawComposeText) => measureText(rawComposeText)
|
2018-02-27 06:22:56 +00:00
|
|
|
)
|
|
|
|
|
2018-02-28 05:01:01 +00:00
|
|
|
store.compute('rawComposeTextOverLimit',
|
|
|
|
['rawComposeTextLength'],
|
|
|
|
(rawComposeTextLength) => rawComposeTextLength > CHAR_LIMIT
|
2018-02-27 06:22:56 +00:00
|
|
|
)
|
|
|
|
}
|