-
Notifications
You must be signed in to change notification settings - Fork 54
Gsoc 2022 #20
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
Merged
Merged
Gsoc 2022 #20
Conversation
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
Starting codebase for the working project See merge request aossie/p2p-messaging-flutter!18
Send the last received message id by implementing the broadcastLastMessageId.
The compile version for android was changed because the android sdk was updated.
The subscription name was misleading and its use for devices. Hence it is changed to deviceSubscription. The conversations initially to empty map with proper naming convention.
Also removed unnecessary packages
The function gets the last message id. The function is able to get both received and sent type of message according to requirements. Other changes are related code formatting.
The pull protocol requires to check if new messages are available or not. So we need to compare there last message ids. Hence the broadcastLastMessageId() first fetches the last message id that is being received and then the message of type update is being broadcasted to connected devices. This update message is then processed in the received data subscription. The compareMessageId compares the last received message id from the connected device with the last message id sent to the device. If they are not same, then messages in the cache are broadcasted.
The text editing controller had state issues due to placed in the build function. The refreshMessages() function is formatted to make it empty before adding messages to it again. scroll controller is used to make the controller place at the last position where the last message is lies. Code is formatted according to Flutter updates and Listview of messages modified.
The provider plugin will be used for state management shared_preferences will be used to save users profile in the device itself.
The ListView is modified in the UI to fix render overflow. checkDevices() function is separated from the init function to modularize the code. Also the devices auto connected. It is fixed by commenting the if statement at line 202. init() calls the checkDevices() and calls broadcastLastMessageId(). It checks whether the message is type of update or not. If yes, then the compareMessageId function is called.
Now the user will set the username for first time after installing and then it will navigate directly to devices list screen.
…refresh of messages
The profile page is called initially to fetch details on login and then again when the user wants the device name to be changed
…een to adhochousekeeping.
Changing Push Protocol to Pull protocol for transferring Messages. See merge request aossie/p2p-messaging-flutter!19
Implementation of Hybrid Protocol, Updating UI and fixing other bugs. Final GSoC 2022 Merge Request See merge request aossie/p2p-messaging-flutter!20
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merging GSoC 2022 branch