[APP-786] Native notifications (#1095)
* move `notifee.ts` to notifications folder * install expo notifications * add UIBackgroundMode `remote-notifications` to app.json * fix notifee import in Debug.tsx * add `google-services.json` * add `development-device` class to eas.json * Add `notifications.ts` for native notification handling * send push token to server * update `@atproto/api` * fix putting notif token to server * fix how push token is uploaded * fix lint * enable debug appview proxy header on all platforms * setup `notifications.ts` to work with app view notifs * clean up notification handler * add comments * update packages to correct versions * remove notifee * clean up code a lil * rename push token endpoint * remove unnecessary comments * fix comments * Remove old background scheduler * Fixes to push notifications API use * Bump @atproto/api@0.6.6 --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
parent
32b9648931
commit
8ab5eb6583
18 changed files with 253 additions and 260 deletions
|
@ -5,9 +5,7 @@ import {ViewHeader} from '../com/util/ViewHeader'
|
|||
import {ThemeProvider, PaletteColorName} from 'lib/ThemeContext'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {s} from 'lib/styles'
|
||||
import {displayNotification} from 'lib/notifee'
|
||||
import * as Toast from 'view/com/util/Toast'
|
||||
|
||||
import {Text} from '../com/util/text/Text'
|
||||
import {ViewSelector} from '../com/util/ViewSelector'
|
||||
import {EmptyState} from '../com/util/EmptyState'
|
||||
|
@ -177,10 +175,7 @@ function ErrorView() {
|
|||
|
||||
function NotifsView() {
|
||||
const triggerPush = () => {
|
||||
displayNotification(
|
||||
'Paul Frazee liked your post',
|
||||
"Hello world! This is a test of the notifications card. The text is long to see how that's handled.",
|
||||
)
|
||||
// TODO: implement local notification for testing
|
||||
}
|
||||
const triggerToast = () => {
|
||||
Toast.show('The task has been completed')
|
||||
|
|
|
@ -505,7 +505,7 @@ export const SettingsScreen = withAuthRequired(
|
|||
System log
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{isDesktopWeb ? (
|
||||
{isDesktopWeb || __DEV__ ? (
|
||||
<ToggleButton
|
||||
type="default-light"
|
||||
label="Experiment: Use AppView Proxy"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue