diff options
author | 2021-10-27 07:25:26 +0530 | |
---|---|---|
committer | 2021-10-27 07:25:26 +0530 | |
commit | 477bdd76a7405ff10a5cfabdec00ee9ae02f2698 (patch) | |
tree | bfa8cfb70e6852b9f535ccfd9b05712269a70dc1 /src/webview/lib/RecipeWebview.js | |
parent | Bumped up ferdi beta version to '5.6.3-beta.2' (diff) | |
parent | 5.6.3-nightly.44 [skip ci] (diff) | |
download | ferdium-app-477bdd76a7405ff10a5cfabdec00ee9ae02f2698.tar.gz ferdium-app-477bdd76a7405ff10a5cfabdec00ee9ae02f2698.tar.zst ferdium-app-477bdd76a7405ff10a5cfabdec00ee9ae02f2698.zip |
Merge branch 'nightly' into release
Diffstat (limited to 'src/webview/lib/RecipeWebview.js')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index f1d493e7c..ebe88ed85 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -5,8 +5,14 @@ import { pathExistsSync, readFileSync, existsSync } from 'fs-extra'; | |||
5 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); | 5 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); |
6 | 6 | ||
7 | class RecipeWebview { | 7 | class RecipeWebview { |
8 | constructor(badgeHandler, notificationsHandler, sessionHandler) { | 8 | constructor( |
9 | badgeHandler, | ||
10 | dialogTitleHandler, | ||
11 | notificationsHandler, | ||
12 | sessionHandler, | ||
13 | ) { | ||
9 | this.badgeHandler = badgeHandler; | 14 | this.badgeHandler = badgeHandler; |
15 | this.dialogTitleHandler = dialogTitleHandler; | ||
10 | this.notificationsHandler = notificationsHandler; | 16 | this.notificationsHandler = notificationsHandler; |
11 | this.sessionHandler = sessionHandler; | 17 | this.sessionHandler = sessionHandler; |
12 | 18 | ||
@@ -59,6 +65,17 @@ class RecipeWebview { | |||
59 | } | 65 | } |
60 | 66 | ||
61 | /** | 67 | /** |
68 | * Set the active dialog title to the app title | ||
69 | * | ||
70 | * @param {string | undefined | null} title Set the active dialog title | ||
71 | * to the app title | ||
72 | * eg. WhatsApp contact name | ||
73 | */ | ||
74 | setDialogTitle(title) { | ||
75 | this.dialogTitleHandler.setDialogTitle(title); | ||
76 | } | ||
77 | |||
78 | /** | ||
62 | * Safely parse the given text into an integer | 79 | * Safely parse the given text into an integer |
63 | * | 80 | * |
64 | * @param {string | number | undefined | null} text to be parsed | 81 | * @param {string | number | undefined | null} text to be parsed |
@@ -127,7 +144,10 @@ class RecipeWebview { | |||
127 | } | 144 | } |
128 | 145 | ||
129 | clearStorageData(serviceId, targetsToClear) { | 146 | clearStorageData(serviceId, targetsToClear) { |
130 | ipcRenderer.send('clear-storage-data', { serviceId, targetsToClear }); | 147 | ipcRenderer.send('clear-storage-data', { |
148 | serviceId, | ||
149 | targetsToClear, | ||
150 | }); | ||
131 | } | 151 | } |
132 | 152 | ||
133 | releaseServiceWorkers() { | 153 | releaseServiceWorkers() { |