Widget: In comments, replace scalar by modular, the official public name that replaces the codename

This commit is contained in:
manuroe 2017-08-30 11:28:51 +02:00
parent 397bf123eb
commit 4d3c30cf9b
5 changed files with 9 additions and 9 deletions

View file

@ -19,7 +19,7 @@
#import <MatrixSDK/MatrixSDK.h> #import <MatrixSDK/MatrixSDK.h>
/** /**
The `Widget` class represents scalar widget information. The `Widget` class represents modular widget information.
*/ */
@interface Widget : NSObject @interface Widget : NSObject

View file

@ -24,7 +24,7 @@
{ {
if (![widgetEvent.type isEqualToString:kWidgetEventTypeString]) if (![widgetEvent.type isEqualToString:kWidgetEventTypeString])
{ {
// The Widget class works only with scalar, aka "im.vector.modular.widgets", widgets // The Widget class works only with modular, aka "im.vector.modular.widgets", widgets
return nil; return nil;
} }

View file

@ -21,7 +21,7 @@
#import "Widget.h" #import "Widget.h"
/** /**
The type of matrix event used for scalar widgets. The type of matrix event used for modular widgets.
*/ */
FOUNDATION_EXPORT NSString *const kWidgetEventTypeString; FOUNDATION_EXPORT NSString *const kWidgetEventTypeString;
@ -50,7 +50,7 @@ WidgetManagerErrorCode;
/** /**
The `WidgetManager` helps to handle scalar widgets. The `WidgetManager` helps to handle modular widgets.
*/ */
@interface WidgetManager : NSObject @interface WidgetManager : NSObject
@ -80,7 +80,7 @@ WidgetManagerErrorCode;
/** /**
Add a scalar widget to a room. Add a modular widget to a room.
@param widgetId the id of the widget. @param widgetId the id of the widget.
@param widgetContent the widget content. @param widgetContent the widget content.

View file

@ -158,7 +158,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
} }
// Send a state event with the widget data // Send a state event with the widget data
// TODO: This API will be shortly replaced by a pure scalar API // TODO: This API will be shortly replaced by a pure modular API
return [room sendStateEventOfType:kWidgetEventTypeString return [room sendStateEventOfType:kWidgetEventTypeString
content:widgetContent content:widgetContent
stateKey:widgetId stateKey:widgetId
@ -181,7 +181,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
NSString *confId = [room.roomId substringWithRange:NSMakeRange(1, [room.roomId rangeOfString:@":"].location - 1)]; NSString *confId = [room.roomId substringWithRange:NSMakeRange(1, [room.roomId rangeOfString:@":"].location - 1)];
confId = [confId stringByAppendingString:widgetSessionId]; confId = [confId stringByAppendingString:widgetSessionId];
// TODO: This url may come from scalar API // TODO: This url may come from modular API
// Note: this url can be used as is inside a web container (like iframe for Riot-web) // Note: this url can be used as is inside a web container (like iframe for Riot-web)
// Riot-iOS does not directly use it but extracts params from it (see `[JitsiViewController openWidget:withVideo:]`) // Riot-iOS does not directly use it but extracts params from it (see `[JitsiViewController openWidget:withVideo:]`)
NSString *url = [NSString stringWithFormat:@"https://scalar-staging.riot.im/scalar/api/widgets/jitsi.html?confId=%@&isAudioConf=%@&displayName=$matrix_display_name&avatarUrl=$matrix_avatar_url&email=$matrix_user_id@", confId, video ? @"false" : @"true"]; NSString *url = [NSString stringWithFormat:@"https://scalar-staging.riot.im/scalar/api/widgets/jitsi.html?confId=%@&isAudioConf=%@&displayName=$matrix_display_name&avatarUrl=$matrix_avatar_url&email=$matrix_user_id@", confId, video ? @"false" : @"true"];
@ -216,7 +216,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
} }
// Send a state event with an empty content to disable the widget // Send a state event with an empty content to disable the widget
// TODO: This API will be shortly replaced by a pure scalar API // TODO: This API will be shortly replaced by a pure modular API
return [room sendStateEventOfType:kWidgetEventTypeString return [room sendStateEventOfType:kWidgetEventTypeString
content:@{} content:@{}
stateKey:widgetId stateKey:widgetId

View file

@ -24,7 +24,7 @@
/** /**
The `JitsiViewController` is a VC for specifically handling a jitsi widget using the The `JitsiViewController` is a VC for specifically handling a jitsi widget using the
jitsi-meet iOS SDK instead of displaying it in a webview like other scalar widgets. jitsi-meet iOS SDK instead of displaying it in a webview like other modular widgets.
https://github.com/jitsi/jitsi-meet/tree/master/ios https://github.com/jitsi/jitsi-meet/tree/master/ios
*/ */