Merge pull request #2354 from ecency/sa/full-comment-editor-cache-bug

fixed comment cache bug in full editor
This commit is contained in:
Feruz M 2022-06-18 14:43:01 +03:00 committed by GitHub
commit 2a6e949052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 16 deletions

View File

@ -748,7 +748,7 @@ SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BugsnagReactNative: a96bc039e0e4ec317a8b331714393d836ca60557
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
DoubleConversion: cde416483dac037923206447da6e1454df403714
FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e
FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
@ -759,7 +759,7 @@ SPEC CHECKSUMS:
FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd
FirebaseMessaging: 5e5118a2383b3531e730d974680954c679ca0a13
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
GoogleAppMeasurement: 4c19f031220c72464d460c9daa1fb5d1acce958e
GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1

View File

@ -48,9 +48,10 @@ export const QuickReplyModalContent = ({
const headerText =
selectedPost && (selectedPost.summary || postBodySummary(selectedPost, 150, Platform.OS as any));
const parentAuthor = selectedPost ? selectedPost.author : '';
const parentPermlink = selectedPost ? selectedPost.permlink : '';
const draftId = `${currentAccount.name}/${parentAuthor}/${parentPermlink}`; //different draftId for each user acount
let parentAuthor = selectedPost ? selectedPost.author : '';
let parentPermlink = selectedPost ? selectedPost.permlink : '';
let draftId = `${currentAccount.name}/${parentAuthor}/${parentPermlink}`; //different draftId for each user acount
useEffect(() => {
handleCloseRef.current = handleSheetClose;

View File

@ -37,15 +37,20 @@ const QuickReplyModal = ({ fetchPost }: QuickReplyModalProps, ref) => {
containerStyle={styles.sheetContent}
keyboardHandlerEnabled
indicatorColor={EStyleSheet.value('$primaryWhiteLightBackground')}
onClose={() => handleCloseRef.current()}
onClose={() => {
setSelectedPost(null); //set null on sheet close, causing inconsistant cache bug
handleCloseRef.current();
}}
>
<QuickReplyModalContent
fetchPost={fetchPost}
selectedPost={selectedPost}
inputRef={inputRef}
sheetModalRef={sheetModalRef}
handleCloseRef={handleCloseRef}
/>
{selectedPost && (
<QuickReplyModalContent
fetchPost={fetchPost}
selectedPost={selectedPost}
inputRef={inputRef}
sheetModalRef={sheetModalRef}
handleCloseRef={handleCloseRef}
/>
)}
</ActionSheet>
</Portal>
);