diff --git a/src/ChoosePluginHandlerVC.mm b/src/ChoosePluginHandlerVC.mm index 0a13b085719088b39ca23974477dc1c49d874e45..c4bf8ace5665ed7d5e42dfe5fcd5c9ee80ad9fd6 100644 --- a/src/ChoosePluginHandlerVC.mm +++ b/src/ChoosePluginHandlerVC.mm @@ -75,11 +75,16 @@ CGFloat PLUGIN_ROW_HEIGHT = 35; NSTextField* textField = [[NSTextField alloc] init]; CGFloat maxWidth = 0; NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium]; - for (auto plugin : availableHandlers) { - NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys: - fontName, NSFontAttributeName, - nil]; - NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:plugin.toNSString() attributes: attrs]; + NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys: + fontName, NSFontAttributeName, + nil]; + for (auto handler : availableHandlers) { + lrc::api::plugin::PluginHandlerDetails handlerDetails; + if (handlerType == FROM_CALL) + handlerDetails = pluginModel->getCallMediaHandlerDetails(handler); + else + handlerDetails = pluginModel->getChatHandlerDetails(handler); + NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:handlerDetails.name.toNSString() attributes: attrs]; textField.attributedStringValue = attributed; [textField sizeToFit]; if (textField.frame.size.width > maxWidth) {