File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/renderer/src/components Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1097,14 +1097,14 @@ function WSAudioPlayer(props: IProps) {
10971097 } ;
10981098
10991099 const handleChanged = useCallback ( async ( ) => {
1100- setChanged && setChanged ( durationRef . current !== 0 ) ;
11011100 setBlobReady && setBlobReady ( false ) ;
11021101 wsBlob ( ) . then ( ( newblob ) => {
11031102 onBlobReady && onBlobReady ( newblob ) ;
11041103 setBlobReady && setBlobReady ( newblob !== undefined ) ;
11051104 if ( setMimeType && newblob ?. type ) setMimeType ( newblob ?. type ) ;
11061105 setDuration ( wsDuration ( ) ) ;
11071106 setProgress ( wsPosition ( ) ) ;
1107+ setChanged && setChanged ( durationRef . current !== 0 ) ;
11081108 } ) ;
11091109 } , [
11101110 setChanged ,
@@ -1163,8 +1163,9 @@ function WSAudioPlayer(props: IProps) {
11631163 } ) ;
11641164 } ;
11651165 const handleUndo = useCallback ( ( ) => {
1166- wsUndo ( ) ;
1167- handleChanged ( ) ;
1166+ wsUndo ( ) . then ( ( ) => {
1167+ handleChanged ( ) ;
1168+ } ) ;
11681169 } , [ wsUndo , handleChanged ] ) ;
11691170 useEffect ( ( ) => {
11701171 if ( ! controlsRef ) return ;
You can’t perform that action at this time.
0 commit comments