23ccec45d0
Part of the way to improving #390. Before this fix, if you recieved a notification while Pinafore was in a background tab, nothing would happen, because most browsers (Edge, Firefox, Chrome) don't run rAF in background tabs. Furthermore, Chrome doesn't run rIC. In this PR we detect if we're in a background tab and then avoid rAF/rIC in that case.
18 lines
638 B
JavaScript
18 lines
638 B
JavaScript
import { instanceObservers } from './instanceObservers'
|
|
import { timelineObservers } from './timelineObservers'
|
|
import { notificationObservers } from './notificationObservers'
|
|
import { onlineObservers } from './onlineObservers'
|
|
import { navObservers } from './navObservers'
|
|
import { autosuggestObservers } from './autosuggestObservers'
|
|
import { pageVisibilityObservers } from './pageVisibilityObservers'
|
|
|
|
export function observers (store) {
|
|
instanceObservers(store)
|
|
timelineObservers(store)
|
|
notificationObservers(store)
|
|
onlineObservers(store)
|
|
navObservers(store)
|
|
autosuggestObservers(store)
|
|
pageVisibilityObservers(store)
|
|
}
|