mirror of
https://github.com/amigan/calls.git
synced 2025-01-31 05:22:37 -05:00
Handle commands separately
This commit is contained in:
parent
6edbf3ac39
commit
c71ecc1b79
1 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,14 @@ class Stillbox extends ChangeNotifier {
|
||||||
case Message_ToClientMessage.hello:
|
case Message_ToClientMessage.hello:
|
||||||
version = msg.hello.version;
|
version = msg.hello.version;
|
||||||
case Message_ToClientMessage.response:
|
case Message_ToClientMessage.response:
|
||||||
final response = msg.response;
|
_handleCommandResponse(msg.response);
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleCommandResponse(CommandResponse response) {
|
||||||
|
switch (response.whichCommandResponse()) {
|
||||||
|
case CommandResponse_CommandResponse.tgInfo:
|
||||||
tgCache.handleTgInfo(response.tgInfo);
|
tgCache.handleTgInfo(response.tgInfo);
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue