File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -735,22 +735,27 @@ extension RNIContextMenuViewContent: RNIContentViewDelegate {
735735 resolveBlock ( [ : ] ) ;
736736
737737 case " provideDeferredElements " :
738- let id : String =
739- try commandArguments. getValueFromDictionary ( forKey: " id " ) ;
738+ let deferredID : String =
739+ try commandArguments. getValueFromDictionary ( forKey: " deferredID " ) ;
740740
741741 let menuElementsRaw : [ Any ] =
742- try commandArguments. getValueFromDictionary ( forKey: " menuElements " ) ;
742+ try commandArguments. getValueFromDictionary ( forKey: " menuItems " ) ;
743743
744744 let menuElements : [ RNIMenuElement ] = menuElementsRaw. compactMap {
745745 guard let dict = $0 as? Dictionary < String , Any > else {
746746 return nil ;
747747 } ;
748748
749- return . init( dictionary: dict) ;
749+ return (
750+ RNIMenuItem ( dictionary: dict)
751+ ?? RNIMenuActionItem ( dictionary: dict)
752+ ?? RNIDeferredMenuElement ( dictionary: dict)
753+ ?? RNIMenuElement ( dictionary: dict)
754+ ) ;
750755 } ;
751756
752757 try self . provideDeferredElements (
753- id: id ,
758+ id: deferredID ,
754759 menuElements: menuElements
755760 ) ;
756761
You can’t perform that action at this time.
0 commit comments