Skip to content
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

Merged
merged 7 commits into from
Nov 26, 2024
Merged

Better bottom navigation #1335

merged 7 commits into from
Nov 26, 2024

Conversation

Soopyboo32
Copy link
Contributor

@Soopyboo32 Soopyboo32 commented Nov 22, 2024

All changes match mihon functionality

@Soopyboo32
Copy link
Contributor Author

0-0 wait today i learn u can double press on the browse button in mihon to open global search, will add that aswell

@Soopyboo32
Copy link
Contributor Author

more page opens settings & history page opens next chapter of last read novel
last read novel seems a pain to do tho, will try tho

@Soopyboo32
Copy link
Contributor Author

also just cherry-picked the same lint error fix so it stops complaining :madge:

Comment on lines 26 to 28
const pluginsWithUpdate = filteredInstalledPlugins.filter(
p => p.hasUpdate,
).length;
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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]);

Copy link
Contributor Author

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

src/screens/browse/BrowseScreen.tsx Show resolved Hide resolved
src/screens/history/HistoryScreen.tsx Show resolved Hide resolved
src/screens/library/LibraryScreen.tsx Show resolved Hide resolved
src/screens/more/MoreScreen.tsx Show resolved Hide resolved
src/screens/updates/UpdatesScreen.tsx Show resolved Hide resolved
@nyagami nyagami merged commit ff771fd into LNReader:master Nov 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants