Migrate frontend realtime messaging to SSE.
Switch service integrations and screen/store consumers from websocket events to SSE, and ignore generated dist-web artifacts. Made-with: Cursor
This commit is contained in:
@@ -15,6 +15,8 @@ import {
|
||||
TouchableOpacity,
|
||||
NativeScrollEvent,
|
||||
NativeSyntheticEvent,
|
||||
Alert,
|
||||
Clipboard,
|
||||
} from 'react-native';
|
||||
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
@@ -357,8 +359,16 @@ export const HomeScreen: React.FC = () => {
|
||||
};
|
||||
|
||||
// 分享帖子
|
||||
const handleShare = (post: Post) => {
|
||||
void post;
|
||||
const handleShare = async (post: Post) => {
|
||||
if (!post?.id) return;
|
||||
try {
|
||||
await postService.sharePost(post.id);
|
||||
} catch (error) {
|
||||
console.error('上报分享次数失败:', error);
|
||||
}
|
||||
const postUrl = `https://browser.littlelan.cn/posts/${encodeURIComponent(post.id)}`;
|
||||
Clipboard.setString(postUrl);
|
||||
Alert.alert('已复制', '帖子链接已复制到剪贴板');
|
||||
};
|
||||
|
||||
// 删除帖子
|
||||
|
||||
Reference in New Issue
Block a user