fix bug that when a user clicks on a notification and goes back to the app it correctly show the chat page. before it would have an infinite spinner

This commit is contained in:
2023-02-02 10:19:52 +02:00
parent 8fca4f27d4
commit 648db552e7
2 changed files with 35 additions and 9 deletions

View File

@@ -2,7 +2,6 @@ import { store } from '../../store.js'
import { doPageUrl } from '../../redux/app/app-actions.js'
export const newMessage = (data) => {
const alert = playSound(data.sound)
// Should I show notification ?
@@ -18,7 +17,7 @@ export const newMessage = (data) => {
}
notify.onclick = (e) => {
const pageUrl = `/app/q-chat/${data.req.url}`
const pageUrl = `/app/q-chat/?chat=${data.req.url}`
store.dispatch(doPageUrl(pageUrl))
}
} else {
@@ -26,7 +25,7 @@ export const newMessage = (data) => {
const notify = new Notification(data.title, data.options)
notify.onclick = (e) => {
const pageUrl = `/app/q-chat/${data.req.url}`
const pageUrl = `/app/q-chat/?chat=${data.req.url}`
store.dispatch(doPageUrl(pageUrl))
}
}