Rework the composer to a less buggy solution

This commit is contained in:
Paul Frazee 2022-11-01 14:25:41 -05:00
parent 05055e184d
commit 8ae6e67eea
10 changed files with 130 additions and 66 deletions

View file

@ -6,7 +6,6 @@ import {AtUri} from '../../../third-party/uri'
import * as PostType from '../../../third-party/api/src/types/app/bsky/post'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {PostThreadViewPostModel} from '../../../state/models/post-thread-view'
import {ComposePostModel} from '../../../state/models/shell'
import {Link} from '../util/Link'
import {RichText} from '../util/RichText'
import {PostDropdownBtn} from '../util/DropdownBtn'
@ -49,12 +48,10 @@ export const PostThreadItem = observer(function PostThreadItem({
const repostsTitle = 'Reposts of this post'
const onPressReply = () => {
store.shell.openModal(
new ComposePostModel({
replyTo: {uri: item.uri, cid: item.cid},
onPost: onPostReply,
}),
)
store.shell.openComposer({
replyTo: {uri: item.uri, cid: item.cid},
onPost: onPostReply,
})
}
const onPressToggleRepost = () => {
item