@enso-ui/notifications 3.2.6 → 3.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/notifications",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "description": "Basic notifications package",
5
5
  "main": "src/bulma/pages/Index.vue",
6
6
  "repository": {
@@ -38,9 +38,6 @@ export default {
38
38
  channels() {
39
39
  return websockets().channels;
40
40
  },
41
- isWebview() {
42
- return app().isWebview;
43
- },
44
41
  },
45
42
 
46
43
  watch: {
@@ -107,7 +104,7 @@ export default {
107
104
  .then(({ data }) => (this.unread = data.count))
108
105
  .catch(this.errorHandler);
109
106
  },
110
- desktop({ body, title, path }) {
107
+ notify({ body, title, path }) {
111
108
  if (document.hidden && this.desktopNotifications) {
112
109
  const notification = new Notification(title, { body });
113
110
 
@@ -168,8 +165,7 @@ export default {
168
165
 
169
166
  this.toast(notification);
170
167
 
171
- return this.webview(notification)
172
- || this.desktop(notification);
168
+ return this.notify(notification);
173
169
  });
174
170
  },
175
171
  now() {
@@ -214,20 +210,6 @@ export default {
214
210
  this.$router.push({ name })
215
211
  .catch(this.routerErrorHandler);
216
212
  },
217
- webview({ body, title }) {
218
- if (this.isWebview) {
219
- // eslint-disable-next-line no-undef
220
- ReactNativeWebView.postMessage(JSON.stringify({
221
- title,
222
- body,
223
- type: 'notification',
224
- }));
225
-
226
- return true;
227
- }
228
-
229
- return false;
230
- },
231
213
  },
232
214
 
233
215
  render() {