MCPcopy Create free account
hub / github.com/Moosync/Moosync / create_context_menu

Function create_context_menu

src/utils/context_menu.rs:611–622  ·  view source on GitHub ↗
(data: T)

Source from the content-addressed store, hash-verified

609}
610
611pub fn create_context_menu<T>(data: T) -> Arc<Box<dyn Menu<T> + Send + Sync>>
612where
613 T: ContextMenuData<T> + 'static + Send + Sync,
614{
615 let ui_store = expect_context::<RwSignal<UiStore>>();
616 let is_mobile = create_read_slice(ui_store, |u| u.get_is_mobile()).get();
617 if is_mobile {
618 Arc::new(Box::new(BottomSheet::new(data)))
619 } else {
620 Arc::new(Box::new(ContextMenu::new(data)))
621 }
622}

Callers 5

SongListFunction · 0.85
SongViewFunction · 0.85
ThemesPrefFunction · 0.85
ExploreFunction · 0.85
AllPlaylistsFunction · 0.85

Calls 2

getMethod · 0.80
get_is_mobileMethod · 0.80

Tested by

no test coverage detected