This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Conversation
aosolis
suggested changes
Oct 4, 2018
| let list = Array<builderteams.ListCardItem>(); | ||
|
|
||
| // list item1 | ||
| let item1 = new builderteams.ListCardItem(); |
Contributor
There was a problem hiding this comment.
Use session, and chain the fluent methods.
new builderteams.ListCardItem(session)
.title(Strings.left_card_item1_title)
...
|
|
||
| // list item1 | ||
| let item1 = new builderteams.ListCardItem(); | ||
| item1.type(builderteams.ListCardItemType.resultItem); |
Contributor
There was a problem hiding this comment.
The default type is resultItem, so strictly speaking this isn't necessary.
| item2.subtitle(session.gettext(Strings.list_card_item1_subtitle)); | ||
|
|
||
| // we have added only two items for this sample, list card support multiple items as needed | ||
| list.push(item1); |
Contributor
There was a problem hiding this comment.
Use addItem() method on ListCard.
| list.push(item1); | ||
| list.push(item2); | ||
|
|
||
| let card = new builderteams.ListCard(); |
Contributor
There was a problem hiding this comment.
Here too, use session and chain the fluent methods.
new ListCard(session)
.title(Strings.list_card_title)
.addItem(xxx)
....
| card.items(list); | ||
|
|
||
| let message = new builder.Message(session); | ||
| message.addAttachment(card.toAttachment()); |
Contributor
There was a problem hiding this comment.
Chain this to the new, and there's no need to call toAttachment()
new builder.Message(session)
.addAttachment(card)
| import { TriggerActionDialog } from "../../../utils/TriggerActionDialog"; | ||
| import { DialogIds } from "../../../utils/DialogIds"; | ||
| import { DialogMatches } from "../../../utils/DialogMatches"; | ||
| // import { ListCard, ListCardItem, ListCardItemType } from "../basic/ListCard"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@msftdherron @jotrick @MattSFT @aosolis @jialic @goelashish7 @robin-liao