tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
missed something in danmu overlay
Natalie B.
4 months ago
98c66a16
eae4aaeb
+5
-8
1 changed file
expand all
collapse all
unified
split
js
app
src
screens
danmu-obs.tsx
+5
-8
js/app/src/screens/danmu-obs.tsx
···
4
4
PlayerProvider,
5
5
usePlayerStore,
6
6
} from "@streamplace/components";
7
7
-
import {
8
8
-
setSidebarHidden,
9
9
-
setSidebarUnhidden,
10
10
-
} from "features/base/sidebarSlice";
11
7
import { useEffect } from "react";
12
8
import { Platform, View } from "react-native";
13
13
-
import { useAppDispatch } from "store/hooks";
9
9
+
import { useStore } from "store";
14
10
15
11
const isWeb = Platform.OS === "web";
16
12
···
45
41
46
42
export default function DanmuOBSScreen({ route }) {
47
43
const user = route.params?.user;
48
48
-
const dispatch = useAppDispatch();
44
44
+
const setSidebarHidden = useStore((state) => state.setSidebarHidden);
45
45
+
const setSidebarUnhidden = useStore((state) => state.setSidebarUnhidden);
49
46
50
47
let danmuParams: DanmuParams = {};
51
48
if (isWeb) {
···
57
54
}
58
55
59
56
useEffect(() => {
60
60
-
dispatch(setSidebarHidden());
57
57
+
setSidebarHidden();
61
58
() => {
62
59
// on unmount, unhide the sidebar
63
63
-
dispatch(setSidebarUnhidden());
60
60
+
setSidebarUnhidden();
64
61
};
65
62
}, []);
66
63