diff --git a/app.json b/app.json
index e42885b..c633dce 100644
--- a/app.json
+++ b/app.json
@@ -155,7 +155,14 @@
],
"./plugins/withHuaweiPush",
"expo-callkit-telecom",
- "expo-splash-screen",
+ [
+ "expo-splash-screen",
+ {
+ "image": "./assets/splash-icon.png",
+ "resizeMode": "contain",
+ "backgroundColor": "#ffffff"
+ }
+ ],
"expo-status-bar"
],
"extra": {
diff --git a/app/(app)/(tabs)/_layout.tsx b/app/(app)/(tabs)/_layout.tsx
index 5774588..e8d6d61 100644
--- a/app/(app)/(tabs)/_layout.tsx
+++ b/app/(app)/(tabs)/_layout.tsx
@@ -50,6 +50,18 @@ export default function TabsLayout() {
[isHomeStackRoute, pathname, triggerHomeTabPress, router]
);
+ const handleAppsTabPress = useCallback(() => {
+ if (pathname.startsWith('/apps/')) {
+ router.replace('/apps');
+ }
+ }, [pathname, router]);
+
+ const handleProfileTabPress = useCallback(() => {
+ if (pathname.startsWith('/profile/')) {
+ router.replace('/profile');
+ }
+ }, [pathname, router]);
+
const tabBarStyle = useMemo(() => {
if (hideTabBar) {
return { display: 'none' as const, height: 0, overflow: 'hidden' as const };
@@ -125,6 +137,9 @@ export default function TabsLayout() {
/>
),
}}
+ listeners={{
+ tabPress: handleAppsTabPress,
+ }}
/>
),
}}
+ listeners={{
+ tabPress: handleProfileTabPress,
+ }}
/>
);
diff --git a/src/components/business/BlockEditor/BlockEditor.tsx b/src/components/business/BlockEditor/BlockEditor.tsx
index db9cde5..c1ef82a 100644
--- a/src/components/business/BlockEditor/BlockEditor.tsx
+++ b/src/components/business/BlockEditor/BlockEditor.tsx
@@ -14,7 +14,8 @@ export interface BlockEditorHandle {
insertTextAtCursor: (text: string) => void;
getSegments: () => MessageSegment[];
getContent: () => string;
- hasUploadingImages: () => boolean;
+ getBlocks: () => EditorBlock[];
+ uploadPendingImages: () => Promise;
focus: () => void;
}
@@ -38,7 +39,8 @@ const BlockEditor = React.forwardRef(
insertTextAtCursor: editor.insertTextAtCursor,
getSegments: editor.getSegments,
getContent: editor.getContent,
- hasUploadingImages: editor.hasUploadingImages,
+ getBlocks: editor.getBlocks,
+ uploadPendingImages: editor.uploadPendingImages,
focus: () => {
const firstTextBlock = editor.blocks.find(b => b.type === 'text');
if (firstTextBlock) {
diff --git a/src/components/business/BlockEditor/ImageBlockView.tsx b/src/components/business/BlockEditor/ImageBlockView.tsx
index aff2f39..a462102 100644
--- a/src/components/business/BlockEditor/ImageBlockView.tsx
+++ b/src/components/business/BlockEditor/ImageBlockView.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { View, TouchableOpacity, StyleSheet, Dimensions, ActivityIndicator } from 'react-native';
+import { View, TouchableOpacity, StyleSheet, Dimensions } from 'react-native';
import { Image as ExpoImage } from 'expo-image';
import { MaterialCommunityIcons } from '@expo/vector-icons';
@@ -41,11 +41,6 @@ const ImageBlockView: React.FC = ({ block, onRemove, style
cachePolicy="memory-disk"
transition={200}
/>
- {block.uploading && (
-
-
-
- )}
onRemove(block.id)}
@@ -66,13 +61,6 @@ const styles = StyleSheet.create({
position: 'relative',
alignItems: 'center',
},
- uploadingOverlay: {
- ...StyleSheet.absoluteFill,
- backgroundColor: 'rgba(0, 0, 0, 0.3)',
- justifyContent: 'center',
- alignItems: 'center',
- borderRadius: borderRadius.md,
- },
removeButton: {
position: 'absolute',
top: 8,
diff --git a/src/components/business/BlockEditor/blockEditorTypes.ts b/src/components/business/BlockEditor/blockEditorTypes.ts
index 240071e..66e1bd8 100644
--- a/src/components/business/BlockEditor/blockEditorTypes.ts
+++ b/src/components/business/BlockEditor/blockEditorTypes.ts
@@ -12,7 +12,7 @@ export interface ImageBlock {
type: 'image';
localUri: string;
remoteUrl?: string;
- uploading: boolean;
+ mimeType?: string;
width?: number;
height?: number;
}
diff --git a/src/components/business/BlockEditor/blocksToSegments.ts b/src/components/business/BlockEditor/blocksToSegments.ts
index 2c9d0e0..c93b7b8 100644
--- a/src/components/business/BlockEditor/blocksToSegments.ts
+++ b/src/components/business/BlockEditor/blocksToSegments.ts
@@ -13,7 +13,6 @@ export function segmentsToBlocks(segments: MessageSegment[]): EditorBlock[] {
type: 'image',
localUri: seg.data.url,
remoteUrl: seg.data.url,
- uploading: false,
width: seg.data.width,
height: seg.data.height,
};
diff --git a/src/components/business/BlockEditor/useBlockEditor.ts b/src/components/business/BlockEditor/useBlockEditor.ts
index 62eef8e..592ec09 100644
--- a/src/components/business/BlockEditor/useBlockEditor.ts
+++ b/src/components/business/BlockEditor/useBlockEditor.ts
@@ -24,6 +24,8 @@ export function useBlockEditor(initialBlocks?: EditorBlock[]) {
const [activeBlockId, setActiveBlockId] = useState(null);
const inputRefs = useRef