From f5f107994f35807eaf6994909a19336784785469 Mon Sep 17 00:00:00 2001 From: yezian Date: Tue, 11 Feb 2025 16:23:39 +0800 Subject: [PATCH] anln_0000001_1.8 (#32) Co-authored-by: al Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_app/pulls/32 --- App.jsx | 2 +- components/MediaPicker/index.jsx | 2 +- components/Post/index.jsx | 72 ++++++++++++++++------------- screeens/CreateImagePost/index.jsx | 2 +- screeens/CreatePost/index.jsx | 2 +- screeens/CreateVideoPost/index.jsx | 2 +- screeens/EditSpacePost/index.jsx | 22 +++++---- screeens/EditStreamerPost/index.jsx | 12 +++-- 8 files changed, 67 insertions(+), 49 deletions(-) diff --git a/App.jsx b/App.jsx index b02c742..fbc4b1e 100644 --- a/App.jsx +++ b/App.jsx @@ -563,7 +563,7 @@ const App = () => { onPress={() => navigation.goBack()} /> ), - title: "动态", + title: "广场动态", headerTitleStyle: { color: "white" }, headerStyle: { backgroundColor: "#07050A" }, })} diff --git a/components/MediaPicker/index.jsx b/components/MediaPicker/index.jsx index f708f7e..1c6a328 100644 --- a/components/MediaPicker/index.jsx +++ b/components/MediaPicker/index.jsx @@ -14,7 +14,6 @@ import { useImageViewer } from "../../context/ImageViewProvider"; import VideoModal from "../VideoModal"; import * as ImagePicker from "expo-image-picker"; import * as VideoThumbnails from "expo-video-thumbnails"; - /* props格式: setDragging 返回正在拖动的状态,用于该组件嵌套在ScrollView中的时候禁用ScrollView的滚动 @@ -65,6 +64,7 @@ export default function MediaPicker({ allowsMultipleSelection: true, selectionLimit: maxCount - _assets.length, quality: 1, + // exif: true, }); if (!result.canceled) { diff --git a/components/Post/index.jsx b/components/Post/index.jsx index a01f198..da6dfc0 100644 --- a/components/Post/index.jsx +++ b/components/Post/index.jsx @@ -129,6 +129,7 @@ export default function Post({ data, isOwn = false, tagElement = null }) { ...tailwind( "ml-1 justify-center items-center rounded-full px-3 h-6" ), + display: !isOwn ? "flex" : "none", }} > @@ -166,51 +167,60 @@ export default function Post({ data, isOwn = false, tagElement = null }) { - {data?.streamer_ext?.is_active_within_a_week === 1 ? ( - - navigation.navigate("SpaceIntroduce", { mid: data?.mid }) - } - style={tailwind("flex flex-row items-center")} - > - - - 空间 - {formatZoneUpdateTime( - data?.streamer_ext - ?.days_elapsed_since_the_last_zones_update - )} - 有更新 - - - - ) : ( - data?.streamer_ext?.zones?.length !== 0 && ( + + {data?.streamer_ext?.is_active_within_a_week === 1 ? ( navigation.navigate("SpaceIntroduce", { mid: data?.mid }) } style={tailwind("flex flex-row items-center")} > + - 查看TA的空间 + 空间 + {formatZoneUpdateTime( + data?.streamer_ext + ?.days_elapsed_since_the_last_zones_update + )} + 有更新 - ) - )} + ) : ( + data?.streamer_ext?.zones?.length !== 0 && ( + + navigation.navigate("SpaceIntroduce", { + mid: data?.mid, + }) + } + style={tailwind("flex flex-row items-center")} + > + + 查看TA的空间 + + + + ) + )} + diff --git a/screeens/EditStreamerPost/index.jsx b/screeens/EditStreamerPost/index.jsx index bc70613..8b26d7b 100644 --- a/screeens/EditStreamerPost/index.jsx +++ b/screeens/EditStreamerPost/index.jsx @@ -4,12 +4,10 @@ import { TextInput, ScrollView, ActivityIndicator, - Modal, KeyboardAvoidingView, - TouchableOpacity, Platform, } from "react-native"; -import React, { useState, useEffect, useCallback } from "react"; +import React, { useState, useEffect } from "react"; import { useTailwind } from "tailwind-rn"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import MediaPicker from "../../components/MediaPicker"; @@ -85,7 +83,7 @@ export default function EditStreamerPost({ navigation, route }) { ), }); - }, [isSubmitting, handleSubmit, formData, mediaAssets]); + }, [isSubmitting, handleSubmit, formData, mediaAssets, oldMediaAssets]); //是否正在拖动图片,用于禁用ScrollView的滚动 const [dragging, setDragging] = useState(false); @@ -231,7 +229,11 @@ export default function EditStreamerPost({ navigation, route }) { )}