Skip to content
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

Merged
merged 26 commits into from
Oct 21, 2024
Merged

Feature messenger api #62

merged 26 commits into from
Oct 21, 2024

Conversation

VincePaulin
Copy link

No description provided.

Copy link

@ignyx ignyx left a 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 Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
}
}

void interpretBridgeResponse(http.Response response) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void interpretBridgeResponse(http.Response response) {
void parseBridgeResponse(http.Response response) {

lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Show resolved Hide resolved
lib/pages/add_bridge/show_bottom_sheet.dart Outdated Show resolved Hide resolved
ConnectionStateModel connectionState,
SocialNetwork network,
) async {
final flowID = network.flowId;
Copy link

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

@VincePaulin VincePaulin force-pushed the feature-messenger-api branch from a56290a to 8edd4b7 Compare October 14, 2024 15:37
Copy link

@ignyx ignyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good progress !

final logins = responseJson['logins'];
if (logins != null && logins.isNotEmpty) {
final stateEvent = logins[0]['state']?['state_event'];
return stateEvent == 'CONNECTED' ? ConnectionStatus.connected : ConnectionStatus.notConnected;
Copy link

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

lib/pages/add_bridge/add_bridge.dart Outdated Show resolved Hide resolved
lib/pages/add_bridge/add_bridge.dart Show resolved Hide resolved
lib/pages/add_bridge/model/social_network.dart Outdated Show resolved Hide resolved
@Tawkie Tawkie deleted a comment Oct 18, 2024
@Tawkie Tawkie deleted a comment Oct 18, 2024
case ConnectionStatus.connecting:
if (kDebugMode) {
print('Connecting to ${network.name}...');
}
Copy link

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}.');
}
Copy link

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 ?

@ignyx
Copy link

ignyx commented Oct 18, 2024

Looks good to me ! Just a curiosity about what we should do with some states

@VincePaulin
Copy link
Author

Looks good to me ! Just a curiosity about what we should do with some states

I think about it

@VincePaulin VincePaulin merged commit 6ac2786 into dev Oct 21, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants