add perf mark for clicking spoiler button

[skip ci]
This commit is contained in:
Nolan Lawson 2018-04-10 22:30:14 -07:00
parent d95de24df5
commit 9bfa2cf013

View file

@ -41,6 +41,7 @@
<script>
import { store } from '../../_store/store'
import { registerClickDelegate, unregisterClickDelegate } from '../../_utils/delegate'
import { mark, stop } from '../../_utils/marks'
export default {
oncreate() {
@ -56,11 +57,13 @@
methods: {
onClickSpoilerButton() {
requestAnimationFrame(() => {
mark('clickSpoilerButton')
let uuid = this.get('uuid')
let $spoilersShown = this.store.get('spoilersShown')
$spoilersShown[uuid] = !$spoilersShown[uuid]
this.store.set({'spoilersShown': $spoilersShown})
this.fire('recalculateHeight')
stop('clickSpoilerButton')
})
}
}