Skip to content

Commit ba5e690

Browse files
authored
Merge pull request #18267 from vector-im/t3chguy/fix/18266
Dismiss electron download toast when clicking Open
2 parents 1d54312 + 1cffed2 commit ba5e690

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vector/platform/ElectronPlatform.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
257257
});
258258

259259
electron.on('userDownloadCompleted', (ev, { path, name }) => {
260+
const key = `DOWNLOAD_TOAST_${path}`;
261+
260262
const onAccept = () => {
261263
electron.send('userDownloadOpen', { path });
264+
ToastStore.sharedInstance().dismissToast(key);
262265
};
263266

264267
ToastStore.sharedInstance().addOrReplaceToast({
265-
key: `DOWNLOAD_TOAST_${path}`,
268+
key,
266269
title: _t("Download Completed"),
267270
props: {
268271
description: name,

0 commit comments

Comments
 (0)