-
Notifications
You must be signed in to change notification settings - Fork 141
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
Issue - 275 (Meaningful Documentation) #286
Issue - 275 (Meaningful Documentation) #286
Conversation
Please provide me the feedback , whether the documentation provided meets the expectation , if not feel free to provide me constructive suggestion.Thank you. |
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.
Hello @Ivan2001otp,
I wanted to commend you on your exceptional work in this area. While reviewing, I noticed several documentation format issues that, if addressed, would greatly enhance the ease of understanding for new users. Kindly consider incorporating these adjustments as needed.
Thank you for your attention to this matter.
/* | ||
- Sets up Android notification settings. | ||
- Registers callback to handle Notification taps(onDidRecieveNotificationResponse) | ||
- Enables overall notification capability. | ||
*/ |
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.
All Dart documentation must be written using ///
. This practice ensures that contributors can quickly understand the functionality of a function by hovering over it.
4.Make the ScrollController to get initialized to that offset. | ||
5.Update tab Controller to switch to discussions tab. | ||
6.Navigate user to the tabs screen. | ||
*/ |
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.
DartDocs, as mentioned
@@ -119,6 +138,11 @@ class AuthStateController extends GetxController { | |||
} | |||
} | |||
|
|||
/* |
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.
DartDocs, as mentioned
@@ -146,12 +170,27 @@ class AuthStateController extends GetxController { | |||
} | |||
} | |||
|
|||
/* |
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.
DartDocs, as mentioned
Future<String> getAppwriteToken() async { | ||
Jwt authToken = await account.createJWT(); | ||
log(authToken.toString()); | ||
return authToken.jwt; | ||
} | ||
|
||
/* |
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.
DartDocs, as mentioned
/* | ||
This service helps to create a new room for meeting , by providing necessary parameters | ||
and returns future. | ||
*/ |
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.
DartDocs, as mentioned
/* | ||
This service helps to join the created chat rooms,and returns the status | ||
of task in Future. | ||
*/ |
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.
DartDocs, as mentioned
/* | ||
- Constructs a liveKitController with the given URI and roomToken | ||
in its constructor parameters. | ||
- Registers the controller as a permanent , singleton Instance via Get. | ||
- Get.put() -> Its a dependency injection to register new instance. | ||
- Returns a future that completes when this is done. | ||
*/ |
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.
DartDocs, as mentioned
/* | ||
This below Widget function provides a Widget UI, to user | ||
that helps to choos the type of theme system default , light or dark theme. | ||
*/ |
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.
DartDocs, as mentioned
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.
correct "choos" to "choose"
/* | ||
- This code retrieves the currently selected theme for the application. | ||
- It prioritizes loading previously saved user preference,but defaults to system's default theme, | ||
if a preference is not found. | ||
*/ |
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.
DartDocs, as mentioned
Hey @Ivan2001otp thank you for your contribution, Great Work 🚀✨ Please do implement the suggested changes and push again, along with solving the merge conflicts with the current state of the repository. We await your reply as a token of acknowledgement, will merge once the requested changes are done P.S. Make this done ASAP as these are just documentation related changes should not take much time, also resolve the conflicts carefully, I will try to get this merged by tomorrow |
Future<String> getAppwriteToken() async { | ||
Jwt authToken = await account.createJWT(); | ||
log(authToken.toString()); | ||
return authToken.jwt; | ||
} | ||
|
||
/* | ||
In the below method(isUserLoggedIn) | ||
- all we are trying to know is whether the userProfile is successfully setup or not. |
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.
and if the user is logged in or not, this goal is not highlighted make it more clear
@@ -195,6 +234,16 @@ class AuthStateController extends GetxController { | |||
}); | |||
} | |||
|
|||
/* | |||
1. Get the current FCM token for the user's device. | |||
2. Fetch the list of subscribed Discussion from appwrite collection. |
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.
Make this,
2. Fetch the List of subscriptions made by this user
3. Loop through the subscriptions
4. Removing the FCM token of this device from the list of FCM tokens of each subscription
5. A FCM token in the list of FCM tokens of a subscription created by this user represents a device to which notification is to be sent on events related to the discussion subscription was made to as the user can login from many devices and if user is logged in through 3 different devices all of them needs to be sent notifications
This below method helps to verify the user entered otp | ||
|
||
Purpose of imp variables used in below code: | ||
- otpId =>Retrieves the otp from user's document, representing the actual OTP. |
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.
otpId: the ID of the otp sent, which will help fetch the actual otp from server side.
prefs: Fetch the user account prefs to get the otpId from it, the otpID gets updated into user account prefs when an otp is sent to the user. It is the Id corresponding to the otp sent to the user
verificationId: After comparison between OTP sent and user entered OTP the server side updates the status of the verification in the verification document (each verification is represented by a document in the verification collection ), status is then used to check if the verification was successful or not
static Future<void> joinLiveKitRoom( | ||
String livekitUri, String roomToken) async { | ||
Get.put(LiveKitController(liveKitUri: livekitUri, roomToken: roomToken), | ||
permanent: true); | ||
} | ||
|
||
/* | ||
- This below method performs the task of updating/adds the total number |
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.
Adds a new participant as a document to the collection of all participants.
roomID: represents the room to which the particiapant belongs
userID: who the participant is
@@ -32,6 +43,11 @@ class RoomService { | |||
Query.equal("uid", [uid]), | |||
Query.equal('roomId', [roomId]) | |||
]); | |||
|
|||
/* | |||
We delete the previous participants data of past meeting , so that |
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.
We delete the participant documents that have the userid as this user, and the room id as the id of the room that this user is being added to. If the documents fetched are not null that would mean that this user was in the room from the same account but from some other device so thus we need to delete that document and proceed with adding this one in order to get rid of more than one user room joining from the same account
String myDocId = await addParticipantToAppwriteCollection( | ||
roomId: appwriteRoomDocId, uid: adminUid, isAdmin: true); | ||
await joinLiveKitRoom(livekitSocketUrl, livekitToken); | ||
|
||
return [appwriteRoomDocId, myDocId]; | ||
} | ||
|
||
//This method deletes the previously created chat room whose ID is associated with 'roomId'. |
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.
Deletes the room with the provided room id, this option is made accessible from the UI to only the admins of the room
@@ -126,6 +151,9 @@ class RoomService { | |||
} | |||
} | |||
|
|||
/* | |||
This method fetches liveKitToken and liveKitSocketUrl,which is necessary to send user to a chat room. |
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.
This method fetches liveKitToken and liveKitSocketUrl, which is necessary to join the user into the room, and have it hear the audio being transmitted in the room
@@ -137,6 +165,10 @@ class RoomService { | |||
return myDocId; | |||
} | |||
|
|||
/* | |||
This method removes the leaving user's presence from the room, | |||
checks if room is now empty, and deletes or updates total-participants accordingly. |
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.
deletes the room from collection or updates the total-participants decreasing it by one
/* | ||
This below Widget function provides a Widget UI, to user | ||
that helps to choos the type of theme system default , light or dark theme. | ||
*/ |
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.
correct "choos" to "choose"
Hey @Ivan2001otp you there please acknowledge, with a response if we do not receive a response from your side in the next 3 days we would have to close this PR |
Hey @Ivan2001otp we need a reply from your side as a token of acknowledgement, in order to prove your activeness, we will close the PR if we do not hear from you within the next 3 - 4 days |
@Aarush-Acharya may i work on this if @Ivan2001otp is not responding. |
Description
This PR involves creating meaningful documentation for the codebase of Flutter app -Resonate .It provides convenient way to understand the code . Tried to explain the key functionalities , wherever it is necessary.
Fixes # (issue)
Issues-275.
Type of change
Documentation update.
Please include screenshots below if applicable.
No screenshots in documentation update.
Checklist:
Maintainer Checklist