Skip to content

Commit 5b684dc

Browse files
committed
fix: ai suggested idk i never used this
1 parent f14f63d commit 5b684dc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/features/gym/GymTile.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ const BaseGymTile = (gym) => {
159159
const handlePopupOpen = useManualPopupTracker('gyms', gym.id)
160160
if (hasRaid) {
161161
sendNotification(`${gym.id}-${hasHatched}`, gym.name, 'raids', {
162+
manualId: gym.id,
162163
lat: gym.lat,
163164
lon: gym.lon,
164165
expire: timerToDisplay,

src/services/desktopNotification.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function sendNotification(key, title, category, options) {
4242
)
4343
if (userSettings.enabled && userSettings[category]) {
4444
if (getPermission() === 'granted') {
45-
const { lat, lon, audio, expire, ...rest } = options
45+
const { lat, lon, audio, expire, manualId, ...rest } = options || {}
4646
const countdown = expire ? expire * 1000 - Date.now() : 1
4747
if (countdown < 0) return
4848
cache.set(key, countdown)
@@ -65,7 +65,12 @@ export function sendNotification(key, title, category, options) {
6565
}
6666
if (lat && lon) {
6767
const { map } = useMapStore.getState()
68-
useMemory.setState({ manualParams: { category, id: key } })
68+
useMemory.setState({
69+
manualParams: {
70+
category,
71+
id: manualId ?? key,
72+
},
73+
})
6974
map.flyTo([lat, lon], 16)
7075
}
7176
notif.close()

0 commit comments

Comments
 (0)