Skip to content

Commit 2e980ad

Browse files
committed
🎨 公開atomにselectedServiceを追加
1 parent bf3f2a3 commit 2e980ad

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Plugin.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import {
2222
contentPlayerTotSelector,
2323
contentPlayerTsFirstPcrSelector,
2424
} from "./atoms/contentPlayerSelectors"
25-
import { globalContentPlayerPlayingContentFamily } from "./atoms/globalFamilies"
25+
import {
26+
globalContentPlayerPlayingContentFamily,
27+
globalContentPlayerSelectedServiceFamily,
28+
} from "./atoms/globalFamilies"
2629
import {
2730
globalActiveContentPlayerIdSelector,
2831
globalContentPlayerIdsSelector,
@@ -102,6 +105,7 @@ export const PluginLoader: React.FC<{
102105
globalContentPlayerIdsSelector,
103106
globalContentPlayerPlayingContentFamily,
104107
globalActiveContentPlayerIdSelector,
108+
globalContentPlayerSelectedServiceFamily,
105109
contentPlayerPlayingContentAtom:
106110
globalContentPlayerPlayingContentFamily(window.id ?? -1),
107111
contentPlayerServiceSelector,

src/types/plugin.ts

+3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export type PluginInRendererArgs = {
8484
globalActiveContentPlayerIdSelector: Recoil.RecoilValueReadOnly<
8585
number | null
8686
>
87+
globalContentPlayerSelectedServiceFamily: (
88+
n: number
89+
) => Recoil.RecoilState<Service | null>
8790
contentPlayerPlayingContentAtom: Recoil.RecoilState<ContentPlayerPlayingContent | null>
8891
contentPlayerServiceSelector: Recoil.RecoilValueReadOnly<Service | null>
8992
contentPlayerProgramSelector: Recoil.RecoilValueReadOnly<Program | null>

0 commit comments

Comments
 (0)