-
Notifications
You must be signed in to change notification settings - Fork 43
Add notification navigation hook and update profile screen to accept id param #2194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dopee
console.info(`Received notification ${JSON.stringify(notification)}`) | ||
if (notification.userInteraction || Platform.OS === 'android') { | ||
track( | ||
make({ | ||
eventName: EventNames.NOTIFICATIONS_OPEN_PUSH_NOTIFICATION, | ||
...(notification.message | ||
? { | ||
title: notification.message.title, | ||
body: notification.message.body | ||
title: notification.message.title ?? notification.title, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh interesting, is this the new format of notifs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea the title and body isn't always in message so just covering that case. Can clean this up after more testing probably
export const useNotificationNavigation = () => { | ||
const navigation = useNavigation() | ||
const dispatch = useDispatch() | ||
const store = useStore<AppState>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, and to double check this does not trigger rerender on any change to store? i imagine not, but wanted to double check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like it does 👍
Added commit to update all of the notif component to use the new hook. Re-requesting review bc of that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, reading your comment about breaking them out at some point too, imo would be nice!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is awesome! Nice job
cc5611b
to
983e4eb
Compare
[218bf87] [C-1420] Show your owned albums and playlists in favorites (#2229) Andrew Mendelsohn [aae57e5] [C-1389] Create release-candidate.staging.audius.co (#2228) Sebastian Klingler [27c1cba] [C-1428] Fix tip reactions in notifications tab (#2226) Dylan Jeffers [c95e341] [C-885] Update mobile environments (#2225) Sebastian Klingler [6da6b6f] Remove prefetch first segment functionality (#2224) Raymond Jacobson [c921ef3] Fix card padding (#2222) Raymond Jacobson [09019ab] [C-1414] Implement mobile upload business logic (#2220) Dylan Jeffers [0f44e9b] Read artist pick from discovery behind feature flag (#2198) Michelle Brier [b486ecd] Fix nethermind configs for mobile (#2221) Isaac Solo [d227c31] Use confirmer wrapper when updating user (#2199) Michelle Brier [2b34ee1] [C-1402] Migrate upload store to common (#2215) Dylan Jeffers [186934f] [C-882] Try to fix too often confetti bug (#2217) Raymond Jacobson [c4439f8] Update README.md (#2216) Raymond Jacobson [172b5f0] Update favorites table to use client side sorting and filtering when all tracks are loaded (#2213) Kyle Shanks [3e42f18] Remove all references of new tables feature flag (#2214) Kyle Shanks [fd0c429] [C-1283][C-1386] Offline Mode - Favorites download and playback (#2154) Andrew Mendelsohn [6c7d9ec] FIx bad linking from a element (#2212) Joseph Lee [490274a] Set animationFinished based on opacity animation (#2211) Sebastian Klingler [edc298d] PAY-716 Take user to trending at end of BuyAudio flow (#2210) Marcus Pasell [6c12b8c] [C-1394] Add uploading and upload-complete screens (#2206) Dylan Jeffers [7b4c3fa] Fix restore_cache (#2209) Dylan Jeffers [4fb5896] Prepare mobile-nav-overhaul for release (#2208) Dylan Jeffers [5da0015] [C-1395, C-1398] Add listening history to account drawer (#2207) Dylan Jeffers [6567487] Update secondary screen background color (#2205) Dylan Jeffers [16fc962] Fix cover photo button alignment (#2204) Raymond Jacobson [8597b76] [C-1323] Somewhat improve upload metrics (#2187) Raymond Jacobson [cf0907e] PAY-687 Add new UI to tipping linking to the BuyAudio flow (#2195) Marcus Pasell [df88393] Fix upload (#2201) Joseph Lee [f1c28bd] Use feature flag for mp3 stream toggle (#2202) Andrew Mendelsohn [3662880] [C-1383] Add upload track form (#2200) Dylan Jeffers [b5f6926] Add notification navigation hook and update profile screen to accept id param (#2194) Kyle Shanks
Description
Add notification navigation hook to be used by notification components and push notifications
This can be updated to have separate handlers for each notification type, but wanted to get the basics down
Dragons
The structure of notifications coming back from identity is not the same as client side, so need to do a lot of verification to make sure that this will work for push notifications
How Has This Been Tested?
Manually tested with a lot of notif types, but need to do testing on device to work out the kinks with push notifications
How will this change be monitored?
N/A
Feature Flags
N/A