Skip to content

Commit

Permalink
Show toast when AVDump install fails, don't open series select modal (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored Oct 23, 2024
1 parent ecbcf18 commit d785308
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/core/slices/utilities/avdump.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createSlice } from '@reduxjs/toolkit';
import { forEach } from 'lodash';

import toast from '@/components/Toast';
import { AVDumpEventTypeEnum } from '@/core/signalr/types';

import type { AVDumpEventType, AVDumpRestoreType } from '@/core/signalr/types';
Expand Down Expand Up @@ -63,6 +64,10 @@ const avdumpSlice = createSlice({
}
break;

case AVDumpEventTypeEnum.InstallException:
toast.error('AVDump failed to install!', event.Message);
break;

default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ function UnrecognizedTab() {
const dumpInProgress = some(avdumpList.sessions, session => session.status === 'Running');

const handleAvdumpClick = useEventCallback(() => {
setSeriesSelectModal(true);
if (isAvdumpFinished && !dumpInProgress) {
setSeriesSelectModal(true);
}

if (!isAvdumpFinished || dumpInProgress) {
avdumpFiles({
Expand Down

0 comments on commit d785308

Please sign in to comment.