Push v2
Push geht jetzt auch wenn das Tab von SmartShopper nicht im Vordergrund ist
This commit is contained in:
		@@ -17,9 +17,11 @@ const messaging = firebase.messaging();
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
messaging.setBackgroundMessageHandler(payload => {
 | 
					messaging.setBackgroundMessageHandler(payload => {
 | 
				
			||||||
 | 
					  // const title = payload.data.title
 | 
				
			||||||
 | 
					  // const options = {
 | 
				
			||||||
 | 
					  //   body: payload.data.text
 | 
				
			||||||
 | 
					  // }
 | 
				
			||||||
 | 
					  // return self.registration.showNotification(title, options)
 | 
				
			||||||
  const title = payload.data.title
 | 
					  const title = payload.data.title
 | 
				
			||||||
  const options = {
 | 
					    new Notification(title, { body: payload.data.text});
 | 
				
			||||||
    body: payload.data.text
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  return self.registration.showNotification(title, options)
 | 
					 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
		Reference in New Issue
	
	Block a user