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

AbstractSetting: Add "formatter" parameter #470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 20, 2023

  1. AbstractSetting: Add "formatter" parameter

    This patch adds a new "formatter: (T) -> String" parameter to the
    AbstractSetting abstract class. This allows for formatter functions to
    be passed to settings for them to display their value in a more user
    friendly way :)
    
    A possible usage of this would be to replace the unit parameter, as it
    simply concatenates the unit string to the setting value, which is a bit
    misleading IMO.
    Baitinq committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    8f4ccbe View commit details
    Browse the repository at this point in the history
  2. AntiDisconnect: Use formatter in the button presses setting

    We now show "$x presses" by using the newly added setting formatter
    Baitinq committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    1229c0b View commit details
    Browse the repository at this point in the history