Fix android starting at notif screen (#8775)
* fix android launching at notif screen * rm heuristic
This commit is contained in:
@@ -400,9 +400,7 @@ export function getNotificationPayload(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function notificationToURL(
|
export function notificationToURL(payload: NotificationPayload): string | null {
|
||||||
payload: NotificationPayload,
|
|
||||||
): string | undefined {
|
|
||||||
switch (payload?.reason) {
|
switch (payload?.reason) {
|
||||||
case 'like':
|
case 'like':
|
||||||
case 'repost':
|
case 'repost':
|
||||||
@@ -433,10 +431,12 @@ export function notificationToURL(
|
|||||||
}
|
}
|
||||||
case 'chat-message':
|
case 'chat-message':
|
||||||
// should be handled separately
|
// should be handled separately
|
||||||
return undefined
|
return null
|
||||||
case 'verified':
|
case 'verified':
|
||||||
case 'unverified':
|
case 'unverified':
|
||||||
default:
|
|
||||||
return '/notifications'
|
return '/notifications'
|
||||||
|
default:
|
||||||
|
// do nothing if we don't know what to do with it
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user