Compare commits

...

1 Commits

Author SHA1 Message Date
Ansh Nanda 953dccd22b restrict user from writing a reply when its been disabled 2023-12-12 02:01:12 +05:30
+7 -1
View File
@@ -1,5 +1,5 @@
import React from 'react'
import {StyleSheet, View} from 'react-native'
import {Alert, StyleSheet, View} from 'react-native'
import Animated from 'react-native-reanimated'
import {useFocusEffect} from '@react-navigation/native'
import {useQueryClient} from '@tanstack/react-query'
@@ -54,6 +54,12 @@ export function PostThreadScreen({route}: Props) {
if (thread?.type !== 'post') {
return
}
if (thread.post.viewer?.replyDisabled) {
return Alert.alert(
"You can't reply to this post",
"Due to the author's settings, you can't reply to this post.",
)
}
openComposer({
replyTo: {
uri: thread.post.uri,