-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature messenger api #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many good things ! Most comments are about error management
lib/pages/add_bridge/add_bridge.dart
Outdated
} | ||
} | ||
|
||
void interpretBridgeResponse(http.Response response) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void interpretBridgeResponse(http.Response response) { | |
void parseBridgeResponse(http.Response response) { |
ConnectionStateModel connectionState, | ||
SocialNetwork network, | ||
) async { | ||
final flowID = network.flowId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the supported flows could be fetched from the API. We should discuss how we choose to do it
a56290a
to
8edd4b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good progress !
lib/pages/add_bridge/add_bridge.dart
Outdated
final logins = responseJson['logins']; | ||
if (logins != null && logins.isNotEmpty) { | ||
final stateEvent = logins[0]['state']?['state_event']; | ||
return stateEvent == 'CONNECTED' ? ConnectionStatus.connected : ConnectionStatus.notConnected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be other states than CONNECTED
case ConnectionStatus.connecting: | ||
if (kDebugMode) { | ||
print('Connecting to ${network.name}...'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use this info to display the status to the user ?
case ConnectionStatus.transientDisconnect: | ||
if (kDebugMode) { | ||
print('Transient disconnect detected for ${network.name}.'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use this info to display the status to the user ?
Looks good to me ! Just a curiosity about what we should do with some states |
I think about it |
No description provided.