mentorship-android icon indicating copy to clipboard operation
mentorship-android copied to clipboard

Feat : Storing requests locally for easy access to user even without network #938

Open CodeChamp-SS opened this issue 4 years ago â€ĸ 35 comments

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

CodeChamp-SS avatar Oct 01 '20 14:10 CodeChamp-SS

@garimasingh128 @aditmehta9 pls review the pr :-)

CodeChamp-SS avatar Oct 01 '20 14:10 CodeChamp-SS

@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

CodeChamp-SS avatar Oct 01 '20 15:10 CodeChamp-SS

I think the config in the travis.yml file need's to be updated to accomodate the newer versions of kotlin and gradle

CodeChamp-SS avatar Oct 01 '20 15:10 CodeChamp-SS

The project is building perfectly on my machine without any problems

CodeChamp-SS avatar Oct 01 '20 15:10 CodeChamp-SS

Okay. I get it. We will look into it. @anitab-org/coding-team can you suggest should we update the travis.yml file?

garimasingh128 avatar Oct 01 '20 15:10 garimasingh128

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

CodeChamp-SS avatar Oct 02 '20 15:10 CodeChamp-SS

Yup, I had asked the same in the private channel for mentors.

garimasingh128 avatar Oct 02 '20 15:10 garimasingh128

@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 ? image

vj-codes avatar Oct 02 '20 15:10 vj-codes

Yup, I had asked the same in the private channel for mentors.

oh kk :-)

CodeChamp-SS avatar Oct 02 '20 15:10 CodeChamp-SS

@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 ? image

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

CodeChamp-SS avatar Oct 02 '20 15:10 CodeChamp-SS

@vj-codes can you pls tell what is the conflict ?? I am not able to figure it out 😅

CodeChamp-SS avatar Oct 21 '20 03:10 CodeChamp-SS

@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.

epicadk avatar Feb 18 '21 18:02 epicadk

@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 avatar Feb 24 '21 08:02 CodeChamp-SS

@CodeChamp-SS please resolve the merge conflicts

vj-codes avatar Mar 12 '21 09:03 vj-codes

@CodeChamp-SS please resolve the merge conflicts

sure

CodeChamp-SS avatar Mar 12 '21 13:03 CodeChamp-SS

@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 :-)

CodeChamp-SS avatar Mar 13 '21 14:03 CodeChamp-SS

@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.

epicadk avatar Mar 13 '21 14:03 epicadk

@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 ?

CodeChamp-SS avatar Mar 13 '21 14:03 CodeChamp-SS

@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

epicadk avatar Mar 13 '21 15:03 epicadk

@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

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 😅

CodeChamp-SS avatar Mar 13 '21 15:03 CodeChamp-SS

@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

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.

epicadk avatar Mar 13 '21 15:03 epicadk

@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

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

CodeChamp-SS avatar Mar 13 '21 15:03 CodeChamp-SS

what difference will git merge --continue make ?

CodeChamp-SS avatar Mar 13 '21 15:03 CodeChamp-SS

what difference will git merge --continue make ?

It will complete the merge commit.

epicadk avatar Mar 20 '21 05:03 epicadk

@CodeChamp-SS please resolve the merge conflicts

vj-codes avatar Mar 26 '21 10:03 vj-codes

@CodeChamp-SS please resolve the merge conflicts

k, lemme try once again

CodeChamp-SS avatar Mar 26 '21 11:03 CodeChamp-SS

@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!

vj-codes avatar Mar 26 '21 11:03 vj-codes

@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 avatar Mar 26 '21 13:03 CodeChamp-SS

they are not getting resolved I don't know why ☚ī¸

CodeChamp-SS avatar Mar 26 '21 13:03 CodeChamp-SS

oh they are finally fixed ..

CodeChamp-SS avatar Mar 26 '21 13:03 CodeChamp-SS