@capytale/meta-player 0.9.7 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capytale/meta-player",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -6,6 +6,7 @@ import {
6
6
  selectPdfInstructions,
7
7
  selectSharedNotesType,
8
8
  setInstructionsType,
9
+ setIsMPDirty,
9
10
  setSharedNotesType,
10
11
  } from "../activityData/activityDataSlice";
11
12
  import {
@@ -21,7 +22,7 @@ import styles from "./style.module.scss";
21
22
  import { Button } from "primereact/button";
22
23
  import settings from "../../settings";
23
24
  import { SelectButton } from "primereact/selectbutton";
24
- import { FC, useCallback, useEffect, useMemo } from "react";
25
+ import { FC, useCallback, useEffect, useMemo, useRef } from "react";
25
26
  import { TabMenu } from "primereact/tabmenu";
26
27
  import { classNames } from "primereact/utils";
27
28
  import { usePedagoOptions } from "./hooks";
@@ -119,6 +120,15 @@ const DocumentSelectorItemActions: FC<{
119
120
  const pdfInstructions = useAppSelector(selectPdfInstructions);
120
121
  const dispatch = useAppDispatch();
121
122
 
123
+ const initTypes = useRef(true);
124
+ useEffect(() => {
125
+ if (initTypes.current) {
126
+ initTypes.current = false;
127
+ return;
128
+ }
129
+ dispatch(setIsMPDirty(true));
130
+ }, [instructionsType, sharedNotesType]);
131
+
122
132
  return (
123
133
  <>
124
134
  {mode === "create" && (