diff --git a/android/app/build.gradle b/android/app/build.gradle index e4f7be4..c957eaf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -79,8 +79,8 @@ android { applicationId "com.satoriapp" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "0.0.0" } signingConfigs { debug { diff --git a/package.json b/package.json index 8f8a9c1..e9f0eb8 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,14 @@ "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", - "test": "jest" + "test": "jest", + "debug-key": "adb shell input keyevent 82", + "release": "react-native run-android --mode=release" }, "dependencies": { "@pchmn/expo-material3-theme": "^1.3.2", "@react-native-async-storage/async-storage": "^1.23.1", "@react-native-camera-roll/camera-roll": "^7.5.2", - "@react-native-clipboard/clipboard": "^1.14.0", "@react-navigation/native": "^6.1.17", "@react-navigation/native-stack": "^6.9.26", "cosmokit": "^1.5.2", @@ -30,7 +31,8 @@ "react-native-use-persist-storage": "^1.0.2", "react-native-vector-icons": "^10.0.3", "react-navigation": "^5.0.0", - "zustand": "^4.5.2" + "zustand": "^4.5.2", + "@react-native-clipboard/clipboard": "^1.14.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/src/components/elements/img.tsx b/src/components/elements/img.tsx index ee53e44..1bca22d 100644 --- a/src/components/elements/img.tsx +++ b/src/components/elements/img.tsx @@ -1,8 +1,9 @@ -import { useState } from "react" +import { useEffect, useState } from "react" import { Image, Modal, PermissionsAndroid, Platform } from "react-native" import { Card, TouchableRipple } from "react-native-paper" import ImageViewer from 'react-native-image-zoom-viewer'; import { CameraRoll } from '@react-native-camera-roll/camera-roll' +import Animated, { useSharedValue, withTiming } from "react-native-reanimated"; async function hasAndroidPermission() { @@ -66,12 +67,13 @@ export const Img = ({ src }) => { console.log(e.nativeEvent.source.width * scale, e.nativeEvent.source.height * scale) }} /> - + setIsVisible(false)} onSwipeDown={() => setIsVisible(false)} onClick={() => setIsVisible(false)} enableSwipeDown={true} + backgroundColor="#00000099" menuContext={{ "saveToLocal": "保存图片", "cancel": "取消" }} onSave={async e => { if (Platform.OS === "android" && !(await hasAndroidPermission())) { diff --git a/src/screens/Chat.tsx b/src/screens/Chat.tsx index 5ae9398..a616197 100644 --- a/src/screens/Chat.tsx +++ b/src/screens/Chat.tsx @@ -125,9 +125,11 @@ const Message = memo(({ message }: { message: SaMessage }) => { setMenuVisible(false) const inspect = v => JSON.stringify(v, null, 4) Alert.alert('消息信息', - `Sender ${inspect(message.user)} - Channel ${inspect(message.channel)} - Content ${inspect(content)}`) +` +ID ${message.id} +Sender ${inspect(message.user)} +Channel ${inspect(message.channel)} +Content ${inspect(content)}`) }} title="详细信息" /> @@ -226,6 +228,9 @@ export const Chat = ({ }} title="清除当前聊天数据" />