* 'main' of https://framagit.org/isUnknown/design-to-pack:
  #88 - fix edit comment system
  delete reply working
This commit is contained in:
Timothée Goguely 2025-01-07 16:07:56 +01:00
commit bc1722495f
5 changed files with 16 additions and 17 deletions

View file

@ -121,8 +121,9 @@ dayjs.locale("fr");
const { user } = useUserStore();
const { page } = usePageStore();
const dialog = useDialogStore();
const { comments, openedFile, draftComment, activeTracks, isEditCommentMode } =
storeToRefs(useDialogStore());
const { comments, openedFile, draftComment, activeTracks } = storeToRefs(
useDialogStore()
);
const api = useApiStore();
const openedComment = ref(null);
@ -304,11 +305,11 @@ function prepareDraftCommentInImage(event) {
}
function openComment(comment) {
if (isEditCommentMode.value) return;
if (comment.isEditMode) return;
openedComment.value = comment;
if (activeTracks?.value.length === 1) {
if (activeTracks.value?.length === 1) {
openedFile.value = activeTracks.value[0].files.find(
(file) => file.uuid === openedComment.value.location.file.uuid
);