Skip to content

Conversation

@ManavSarkar
Copy link
Contributor

Merging GSoC 2022 branch

ManavSarkar and others added 30 commits June 13, 2022 21:09
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.
The profile page is called initially to fetch details on login and then again when the user wants the device name to be changed
ManavSarkar and others added 9 commits August 16, 2022 13:26
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
@ManavSarkar ManavSarkar merged commit 0ca5b82 into main Aug 13, 2024
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