|
@@ -1,6 +1,5 @@
|
|
import { Model } from '@vuex-orm/core';
|
|
import { Model } from '@vuex-orm/core';
|
|
import { nanoid } from 'nanoid';
|
|
import { nanoid } from 'nanoid';
|
|
-import browser from 'webextension-polyfill';
|
|
|
|
|
|
|
|
class Log extends Model {
|
|
class Log extends Model {
|
|
static entity = 'logs';
|
|
static entity = 'logs';
|
|
@@ -28,14 +27,6 @@ class Log extends Model {
|
|
static afterDelete(item) {
|
|
static afterDelete(item) {
|
|
const logs = this.query().where('collectionLogId', item.id).get();
|
|
const logs = this.query().where('collectionLogId', item.id).get();
|
|
|
|
|
|
- browser.storage.local.get('logsCtxData').then((data) => {
|
|
|
|
- const logsCtxData = data.logsCtxData || {};
|
|
|
|
-
|
|
|
|
- delete logsCtxData[item.id];
|
|
|
|
-
|
|
|
|
- browser.storage.local.set({ logsCtxData });
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
if (logs.length !== 0) {
|
|
if (logs.length !== 0) {
|
|
Promise.allSettled(logs.map(({ id }) => this.delete(id))).then(() => {
|
|
Promise.allSettled(logs.map(({ id }) => this.delete(id))).then(() => {
|
|
this.store().dispatch('saveToStorage', 'workflows');
|
|
this.store().dispatch('saveToStorage', 'workflows');
|