Give a meaningful error in the composer when replying to a deleted post (#4464)
parent
0404111f03
commit
c2d7d23423
|
@ -305,7 +305,13 @@ export const ComposePost = observer(function ComposePost({
|
||||||
localThumb: undefined,
|
localThumb: undefined,
|
||||||
} as apilib.ExternalEmbedDraft)
|
} as apilib.ExternalEmbedDraft)
|
||||||
}
|
}
|
||||||
setError(cleanError(e.message))
|
let err = cleanError(e.message)
|
||||||
|
if (err.includes('not locate record')) {
|
||||||
|
err = _(
|
||||||
|
msg`We're sorry! The post you are replying to has been deleted.`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
setError(err)
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
return
|
return
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -785,11 +791,12 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
errorLine: {
|
errorLine: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
backgroundColor: colors.red1,
|
backgroundColor: colors.red1,
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
marginHorizontal: 16,
|
marginHorizontal: 16,
|
||||||
paddingHorizontal: 8,
|
paddingHorizontal: 12,
|
||||||
paddingVertical: 6,
|
paddingVertical: 10,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
reminderLine: {
|
reminderLine: {
|
||||||
|
|
Loading…
Reference in New Issue