mentorship-android
mentorship-android copied to clipboard
Feat : Storing requests locally for easy access to user even without network #938
Description
Storing the requests for offline viewing. Room database has been used along with coroutines so that the main ui thread is not blocked while saving, deleting, and retrieving the data from database. Once the user opens the requests fragment with internet connection, the requests get saved in the database then and there only and are saved until the user signs out. After the signout, the database is cleared so that if the user signs in with a different account then he/she doesn't see the requests from previous account in the offline mode. In the offline mode if the user clicks on accept, reject or delete request then a message is shown accordingly that the particular task requires internet connection.
Fixes #938
Type of Change:
- Code
Code/Quality Assurance Only
- New feature (non-breaking change which adds functionality pre-approved by mentors)
How Has This Been Tested?
On 2 different emulators and a physical device (Samsun Galaxy J-6) https://drive.google.com/file/d/1RE6ehWEntZqYD4lZj3dT7YSsWZFwZUYW/view?usp=sharing
Checklist:
- [x] My PR follows the style guidelines of this project
- [x] I have performed a self-review of my own code or materials
- [x] I have commented my code, particularly in hard-to-understand areas
Code/Quality Assurance Only
- [x] My changes generate no new warnings
@garimasingh128 @aditmehta9 pls review the pr :-)
@garimasingh128 i think there is some problem with config of the build test that's why my previous pr of storing profile details for offline viewing was also failing the build
I think the config in the travis.yml file need's to be updated to accomodate the newer versions of kotlin and gradle
The project is building perfectly on my machine without any problems
Okay. I get it. We will look into it. @anitab-org/coding-team can you suggest should we update the travis.yml file?
Okay. I get it. We will look into it. @anitab-org/coding-team can you suggest should we update the travis.yml file?
@garimasingh128 i think you should ask @anitab-org/coding-team the same on zulip chat as i think the tag is not referencing anything here so the coding team won't know that you mentioned them
Yup, I had asked the same in the private channel for mentors.
@CodeChamp-SS hey the team indeed gets notified after tagging here , the build log clearly says about what went wrong and what is replaced. Can you figure it out after going through it ?
Yup, I had asked the same in the private channel for mentors.
oh kk :-)
@CodeChamp-SS hey the team indeed gets notified after tagging here , the build log clearly says about what went wrong and what is replaced. Can you figure it out after going through it ?
i think :
build-tools-28.0.3 - android-28 before_install:
- yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-28"
this part of the travis.yml file needs to be updated in order to support Android SDK Build-Tools 29.0.2
and i think it currently supports versions only till 28.0.3
@vj-codes can you pls tell what is the conflict ?? I am not able to figure it out đ
@vj-codes can you pls tell what is the conflict ?? I am not able to figure it out đ
You can see them below. Try using git merge upstream/develop on your local branch and you can see them in android studio.
@garimasingh128 @vj-codes after the removal of travis.yml all the checks have passed and i've also resolved the merge conflicts, Please review the pr again :-)
@CodeChamp-SS please resolve the merge conflicts
@CodeChamp-SS please resolve the merge conflicts
sure
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
you can see yourself there no such merge conflicts, but they are still showing up after my last commit which ideally should've not been the case. Do you have any idea on how to fix it ?
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
you can see yourself there no such merge conflicts, but they are still showing up after my last commit which ideally should've not been the case. Do you have any idea on how to fix it ?
First you'll have to undo your previous git reset --soft head~1
and then you can do git merge upstream/develop
after which it will as you to solve the conflicts and then do git merge --continue
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
you can see yourself there no such merge conflicts, but they are still showing up after my last commit which ideally should've not been the case. Do you have any idea on how to fix it ?
First you'll have to undo your previous
git reset --soft head~1
and then you can dogit merge upstream/develop
after which it will as you to solve the conflicts and then dogit merge --continue
I also did the same, pulled the latest develop branch and then fixed the merge conflicts in android studio and then made my last commit đ
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
you can see yourself there no such merge conflicts, but they are still showing up after my last commit which ideally should've not been the case. Do you have any idea on how to fix it ?
First you'll have to undo your previous
git reset --soft head~1
and then you can dogit merge upstream/develop
after which it will as you to solve the conflicts and then dogit merge --continue
I also did the same, pulled the latest develop branch and then fixed the merge conflicts and then made my last commit đ
Did you do git merge --continue
or did you make the commit. Because those two are different things.
@vj-codes I had resolved the conflicts but it's still showing them, i guess they've to be taken care of while merging the pr only and you can also see that the conflicts that are shown are not much relevant :-)
Merging is blocked till the conflicts are solved.
you can see yourself there no such merge conflicts, but they are still showing up after my last commit which ideally should've not been the case. Do you have any idea on how to fix it ?
First you'll have to undo your previous
git reset --soft head~1
and then you can dogit merge upstream/develop
after which it will as you to solve the conflicts and then dogit merge --continue
I also did the same, pulled the latest develop branch and then fixed the merge conflicts and then made my last commit đ
Did you do
git merge --continue
or did you make the commit. Because those two are different things.
I made a commit
what difference will git merge --continue
make ?
what difference will
git merge --continue
make ?
It will complete the merge commit.
@CodeChamp-SS please resolve the merge conflicts
@CodeChamp-SS please resolve the merge conflicts
k, lemme try once again
@CodeChamp-SS ahh I think it worked there were more than 2 before but can you also try to resolve the remaining 2 please, thanks!
@CodeChamp-SS ahh I think it worked there were more than 2 before but can you also try to resolve the remaining 2 please, thanks!
they are not getting resolved I don't know why âšī¸
oh they are finally fixed ..