mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Dismiss electron download toast when clicking Open
This commit is contained in:
parent
af70b09fd7
commit
1cffed2336
@ -257,12 +257,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
});
|
});
|
||||||
|
|
||||||
electron.on('userDownloadCompleted', (ev, { path, name }) => {
|
electron.on('userDownloadCompleted', (ev, { path, name }) => {
|
||||||
|
const key = `DOWNLOAD_TOAST_${path}`;
|
||||||
|
|
||||||
const onAccept = () => {
|
const onAccept = () => {
|
||||||
electron.send('userDownloadOpen', { path });
|
electron.send('userDownloadOpen', { path });
|
||||||
|
ToastStore.sharedInstance().dismissToast(key);
|
||||||
};
|
};
|
||||||
|
|
||||||
ToastStore.sharedInstance().addOrReplaceToast({
|
ToastStore.sharedInstance().addOrReplaceToast({
|
||||||
key: `DOWNLOAD_TOAST_${path}`,
|
key,
|
||||||
title: _t("Download Completed"),
|
title: _t("Download Completed"),
|
||||||
props: {
|
props: {
|
||||||
description: name,
|
description: name,
|
||||||
|
Loading…
Reference in New Issue
Block a user