-
Notifications
You must be signed in to change notification settings - Fork 195
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
Better bottom navigation #1335
Better bottom navigation #1335
Conversation
0-0 wait today i learn u can double press on the browse button in mihon to open global search, will add that aswell |
more page opens settings & history page opens next chapter of last read novel |
also just cherry-picked the same lint error fix so it stops complaining :madge: |
src/navigators/BottomNavigator.tsx
Outdated
const pluginsWithUpdate = filteredInstalledPlugins.filter( | ||
p => p.hasUpdate, | ||
).length; |
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.
should use useMemo
to avoid unnessary calculations
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.
dont think we can here cus it has to update when they update a plugin
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.
useMemo has dependencies option,
const pluginsWithUpdate = useMemo(() => filteredInstalledPlugins.filter(
p => p.hasUpdate,
).length;, [filteredInstalledPlugins]);
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.
i guess its fine cus when u update a plugin it creates a new plugin object instead of modifying existing, when u refresh the plugin indicator it just mutates existing objects tho so memo wont be rerun
tbh users arent likely to manually reload plugins tho so ig fine
All changes match mihon functionality