Merge branch 'development' into nt/hive-auth

This commit is contained in:
noumantahir 2024-10-28 20:23:41 +05:00
commit d04aa637df
4 changed files with 18 additions and 9 deletions

View File

@ -30,6 +30,7 @@ type Props = {
paramFiles: any[];
isEditing: boolean;
isPreviewActive: boolean;
isEditMode: boolean;
setIsUploading: (isUploading: boolean) => void;
handleMediaInsert: (data: MediaInsertData[]) => void;
handleOnAddLinkPress: () => void;
@ -44,6 +45,7 @@ export const EditorToolbar = ({
paramFiles,
isEditing,
isPreviewActive,
isEditMode,
setIsUploading,
handleMediaInsert,
handleOnAddLinkPress,
@ -284,6 +286,7 @@ export const EditorToolbar = ({
name="text-short"
/>
{!isEditMode && (
<IconButton
size={18}
style={[styles.rightIcons, !!pollDraft?.title && styles.iconBottomBar]}
@ -292,6 +295,7 @@ export const EditorToolbar = ({
name="chart"
onPress={_showPollsExtension}
/>
)}
<IconButton
onPress={_showImageUploads}

View File

@ -447,6 +447,7 @@ const MarkdownEditorView = ({
postBody={bodyTextRef.current}
isPreviewActive={isPreviewActive}
paramFiles={paramFiles}
isEditMode={isEdit}
setIsUploading={setIsUploading}
handleMediaInsert={_handleMediaInsert}
handleOnAddLinkPress={_handleOnAddLinkPress}

View File

@ -961,6 +961,8 @@ class EditorContainer extends Component<EditorContainerProps, any> {
videoThumbUrls: speakContentBuilder.thumbUrlsRef.current,
thumbUrl,
fetchRatios: true,
postType: jsonMetadata.type,
contentType: jsonMetadata.content_type,
});
let jsonMeta = {};

View File

@ -229,6 +229,7 @@ export const extractMetadata = async ({
videoThumbUrls,
fetchRatios,
postType,
contentType,
videoPublishMeta,
pollDraft,
}: {
@ -237,6 +238,7 @@ export const extractMetadata = async ({
videoThumbUrls: string[];
fetchRatios?: boolean;
postType?: PostTypes;
contentType?: ContentType;
videoPublishMeta?: ThreeSpeakVideo;
pollDraft?: PollDraft;
}) => {
@ -244,7 +246,7 @@ export const extractMetadata = async ({
// const userReg = /(^|\s)(@[a-z][-.a-z\d]+[a-z\d])/gim;
let out: PostMetadata = {
content_type: ContentType.GENERAL,
content_type: contentType || ContentType.GENERAL,
};
const mUrls = extractUrls(body);