Skip to content

Commit fc2ef52

Browse files
committed
(Chatbox): Simplify _createSession
1 parent da4c789 commit fc2ef52

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/src/chatbox.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,9 @@ class ChatBoxState extends State<ChatBox> {
174174
options["signature"] = widget.session.signature;
175175
}
176176

177-
execute('const options = ${json.encode(options)};');
177+
options["me"] = getUserVariableName(widget.session.me);
178178

179-
final variableName = getUserVariableName(widget.session.me);
180-
execute('options["me"] = $variableName;');
181-
182-
execute('const session = new Talk.Session(options);');
179+
execute('const session = new Talk.Session(${json.encode(options)});');
183180
}
184181

185182
void _createChatBox() {

0 commit comments

Comments
 (0)