Skip to content

Commit 35a2018

Browse files
committed
fix: change toggle function name
1 parent 93b1581 commit 35a2018

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package/src/components/Attachment/AudioAttachment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
151151
};
152152

153153
const handlePlayPause = () => {
154-
audioPlayer.togglePlayPause();
154+
audioPlayer.toggle();
155155
};
156156

157157
const handleEnd = async () => {

package/src/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const AudioRecordingPreview = (props: AudioRecordingPreviewProps) => {
104104
} = useTheme();
105105

106106
const handlePlayPause = () => {
107-
audioPlayer.togglePlayPause();
107+
audioPlayer.toggle();
108108
};
109109

110110
const progressDuration = useMemo(

package/src/state-store/audio-player.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class AudioPlayer {
300300
}
301301
}
302302

303-
togglePlayPause() {
303+
toggle() {
304304
if (this.isPlaying) {
305305
this.pause();
306306
} else {

0 commit comments

Comments
 (0)