New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add visibility select in ShareMemoDialog #2941
Conversation
await memoStore | ||
.updateMemo( | ||
{ | ||
id: memo.id, | ||
visibility: visibility, | ||
}, | ||
["visibility"], | ||
) | ||
.then((newMemo: Memo) => { | ||
if (newMemo.visibility == visibility) { | ||
toast.success(t("common.changed")); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to use then
in async/await
function.
await memoStore | |
.updateMemo( | |
{ | |
id: memo.id, | |
visibility: visibility, | |
}, | |
["visibility"], | |
) | |
.then((newMemo: Memo) => { | |
if (newMemo.visibility == visibility) { | |
toast.success(t("common.changed")); | |
} | |
}); | |
const updatedMemo = await memoStore | |
.updateMemo( | |
{ | |
id: memo.id, | |
visibility: visibility, | |
}, | |
["visibility"], | |
) | |
.then((newMemo: Memo) => { | |
if (newMemo.visibility == visibility) { | |
toast.success(t("common.changed")); | |
} | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I force-pushed a new version, please check it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In ShareMemoDialog, user can change the visibility of the memo, so that the memo can be set to public to be viewed by anyone with the link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am not familiar with ts/react coding, so please make a double check before merge.
In ShareMemoDialog, user can change the visibility of the memo, so that the memo can be set to public to be viewed by anyone with the link.
related issue: #2868
related pr: #2931