diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-26 12:36:27 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-01-26 12:36:27 -0600 |
commit | 751dfb20fd0d316da396e3c4fc53aaaaa8041dd1 (patch) | |
tree | 55c23e901903cfa19b6b9acc264df0d0637d66f0 /src/state/models | |
parent | d6ec627c8cd32836e5ed494606318959ca17fca1 (diff) | |
download | voidsky-751dfb20fd0d316da396e3c4fc53aaaaa8041dd1.tar.zst |
Add web polyfills
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/profile-view.ts | 2 | ||||
-rw-r--r-- | src/state/models/root-store.ts | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index a1535693c..3228c57e8 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -1,5 +1,5 @@ import {makeAutoObservable, runInAction} from 'mobx' -import {Image as PickedImage} from 'react-native-image-crop-picker' +import {Image as PickedImage} from '../../view/com/util/images/ImageCropPicker' import { AppBskyActorGetProfile as GetProfile, AppBskyActorProfile as Profile, diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index c4798ad0b..2f6931cdc 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -6,7 +6,7 @@ import {makeAutoObservable} from 'mobx' import {sessionClient as AtpApi, SessionServiceClient} from '@atproto/api' import {createContext, useContext} from 'react' import {DeviceEventEmitter, EmitterSubscription} from 'react-native' -import BackgroundFetch from 'react-native-background-fetch' +import * as BgScheduler from '../lib/bg-scheduler' import {isObj, hasProp} from '../lib/type-guards' import {LogModel} from './log' import {SessionModel} from './session' @@ -124,8 +124,7 @@ export class RootStoreModel { // background fetch runs every 15 minutes *at most* and will get slowed down // based on some heuristics run by iOS, meaning it is not a reliable form of delivery // -prf - BackgroundFetch.configure( - {minimumFetchInterval: 15}, + BgScheduler.configure( this.onBgFetch.bind(this), this.onBgFetchTimeout.bind(this), ).then(status => { @@ -138,12 +137,12 @@ export class RootStoreModel { if (this.session.hasSession) { await this.me.bgFetchNotifications() } - BackgroundFetch.finish(taskId) + BgScheduler.finish(taskId) } onBgFetchTimeout(taskId: string) { this.log.debug(`Background fetch timed out for task ${taskId}`) - BackgroundFetch.finish(taskId) + BgScheduler.finish(taskId) } } |