Add scroll-to-top for all screens (#177)

This commit is contained in:
Paul Frazee
2023-02-09 16:10:22 -06:00
committed by GitHub
parent b84c88cd21
commit 70b0dc070a
8 changed files with 60 additions and 22 deletions
+10
View File
@@ -166,6 +166,16 @@ export class RootStoreModel {
DeviceEventEmitter.emit('navigation')
}
// a "soft reset" typically means scrolling to top and loading latest
// but it can depend on the screen
onScreenSoftReset(handler: () => void): EmitterSubscription {
return DeviceEventEmitter.addListener('screen-soft-reset', handler)
}
emitScreenSoftReset() {
DeviceEventEmitter.emit('screen-soft-reset')
}
// background fetch
// =
// - we use this to poll for unread notifications, which is not "ideal" behavior but