Skip to content

Conversation

@Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Mar 12, 2023

This PR is mostly a refactor, but also add a new caching mechanic to:
songInfo.getImage() and notifications.[nativeImageToLogo() , saveImage()]

  • Adds the following pseudo decorators: (which are actually high order functions)

    • singleton
    • debounce
    • cache
    • throttle
    • memoize
    • retry
  • Implement the first 3 in a few plugins

you can find the decorators in providers/decorators.js

one day https://github.com/tc39/proposal-decorators will be available, and those pseudo decorators will be converted to actual decorators

TODO:
#1054 - 83abbdb (#1054) can use cache

};

module.exports.moveVolumeHud = moveVolumeHud;
//without this function it would rewrite config 20 time when volume change by 20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
//without this function it would rewrite config 20 time when volume change by 20
//without this function it would rewrite config 20 times when volume change by 20

@th-ch th-ch merged commit 99e0eec into pear-devs:master Apr 2, 2023
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.

2 participants