-
Notifications
You must be signed in to change notification settings - Fork 46
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
Display nearby books in Explore Nearby Screen Iplemented #140
Display nearby books in Explore Nearby Screen Iplemented #140
Conversation
How did you get the books more than 20 km? |
Yes, I am fetching those books only that are added by any particular user. |
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.
@kshitij5 dont include the owned books of the user who is running the app in the Explore nearby screen.
Rest everything is fine but there was another glitch for which I'll create a new issue if you want, or you can make changes in this PR only.
@Mohitmadhav I already thought about that situation and no books listed by the user who is running the app are being shown in explore section. |
3a768eb
to
e4af128
Compare
Yeah @kshitij5, but actually the issue creation would be for Navigation to the book description page in Explore screen not the play store link (That play store link navigation should only be for the dashboard page books) And please don't waste too much time on lint |
Understood ! @Mohitmadhav, I actually completely overlooked the navigation part because the Figma UI suggests that both books from the dashboard and Explore section follow the same navigation! So, I thought once the Discover Now section is implemented, explore navigation will also be implemented. Anyway, what should I do next? Should I create another book card widget, which irrespective of if the book has complete info or not...will always navigate to the book description page? |
No no @kshitij5 , actually the thing is...
so changes could be made in the existing BookCard Widget. |
Okay! I'll make the necessary changes tomorrow. |
@kshitij5 pull the latest changes using |
Hi, as I was looking to make changes to the BookCard widget to get the required behavior I couldn't think of any way to navigate that way! One way to achieve that behavior could be to stop storing infolink for the book since we are reusing the same widget both in the dashboard and Explore Books screen there is no way to know in which screen we need to navigate! Please leave me with some hints if you know how to achieve that! |
For now I also can think of only that way which you did, one way to improve the algorithm is to store which city the user is in addition to its location, this can be helpful as we then only have to calculate distance of those in same city, we can also customise it to add blocks/sector in cities. The Geolocation package/api gives a detailed address based on location, so if we can store all the different values like city/state/pin number/street in user in different fields then we can do a better search, we can start with Pin Number, which is generally associated with nearest post office to limit the calculations. I hope what I am saying is understandable |
This way we can reduce time complexity and make it more scalable |
@Mohitmadhav I have made changes so that everything gets navigated to Book Description Screen for now! @HARSHBHUDOLIA yes, for that we might need to refactor the users model again! Or we might even completely change the structure of the collection. Instead of nesting books under user, we can create a separate books collection with |
@Mohitmadhav I have solved the merge conflict and as for the efficient book fetching API, I'll create another issue, where we can address and solve that! |
@Mohitmadhav @HARSHBHUDOLIA I was thinking if is it possible to get point B's latlong (in range) if we know the point A's latlong and distance between Point A and Point B? If it's possible then fetching it will become significantly easier! |
… On Wed, Oct 20, 2021 at 4:16 PM Avishek Kumar Sharma < ***@***.***> wrote:
@Mohitmadhav <https://github.com/Mohitmadhav> @HARSHBHUDOLIA
<https://github.com/HARSHBHUDOLIA> I was thinking if is it possible to
get point B's latlong (in range) if we know the point A's latlong and
distance between Point A and Point B? If it's possible then fetching it
will become significantly easier!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIU6QBYQDH6HLIHEHRECFWLUH2MYFANCNFSM5FVMFTBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@Mohitmadhav Hi, I don't think I can improve the fetching algorithm anymore to the best of my knowledge! You can merge this PR if it satisfies the requirement! |
@kshitij5 I implemented it for now... |
@Mohitmadhav yes can create issue for that and I'll try to work on them too! |
Yeah sure @kshitij5 ... |
Description
This PR tries to implement the Books Explore section #94 . Below is the screenshot. Will be happy to refactor code if necessary!
Fixes #94
Type of change
Checklist: