wrap interval in runInAction (#1037)
parent
0ae52e91ce
commit
302490cb31
|
@ -1,6 +1,6 @@
|
||||||
import {AppBskyEmbedRecord} from '@atproto/api'
|
import {AppBskyEmbedRecord} from '@atproto/api'
|
||||||
import {RootStoreModel} from '../root-store'
|
import {RootStoreModel} from '../root-store'
|
||||||
import {makeAutoObservable} from 'mobx'
|
import {makeAutoObservable, runInAction} from 'mobx'
|
||||||
import {ProfileModel} from '../content/profile'
|
import {ProfileModel} from '../content/profile'
|
||||||
import {isObj, hasProp} from 'lib/type-guards'
|
import {isObj, hasProp} from 'lib/type-guards'
|
||||||
import {Image as RNImage} from 'react-native-image-crop-picker'
|
import {Image as RNImage} from 'react-native-image-crop-picker'
|
||||||
|
@ -347,7 +347,9 @@ export class ShellUiModel {
|
||||||
|
|
||||||
setupClock() {
|
setupClock() {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.tickEveryMinute = Date.now()
|
runInAction(() => {
|
||||||
|
this.tickEveryMinute = Date.now()
|
||||||
|
})
|
||||||
}, 60_000)
|
}, 60_000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue