fix(chat): add voice unlock payment choices
This commit is contained in:
@@ -18,6 +18,7 @@ export interface MessageContentProps {
|
||||
isUnlockingPrivate?: boolean;
|
||||
onUnlockPrivateMessage?: (messageId: string) => void;
|
||||
onUnlockImagePaywall?: () => void;
|
||||
onUnlockVoiceMessage?: () => void;
|
||||
}
|
||||
|
||||
const IMAGE_PLACEHOLDER = "[图片]";
|
||||
@@ -36,6 +37,7 @@ export function MessageContent({
|
||||
isUnlockingPrivate = false,
|
||||
onUnlockPrivateMessage,
|
||||
onUnlockImagePaywall,
|
||||
onUnlockVoiceMessage,
|
||||
}: MessageContentProps) {
|
||||
const hasImage = imageUrl != null && imageUrl.length > 0;
|
||||
const hasAudio = audioUrl != null && audioUrl.length > 0;
|
||||
@@ -85,8 +87,8 @@ export function MessageContent({
|
||||
hint={privateMessageHint}
|
||||
isUnlocking={isUnlockingPrivate}
|
||||
onUnlock={
|
||||
isLockedVoiceMessage && messageId
|
||||
? () => onUnlockPrivateMessage?.(messageId)
|
||||
isLockedVoiceMessage
|
||||
? onUnlockVoiceMessage
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user