Skip to content

Commit

Permalink
Add sortName
Browse files Browse the repository at this point in the history
  • Loading branch information
emorydunn committed Dec 15, 2023
1 parent d09ea29 commit 6584951
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Support for `dialDown` and `dialUp` events
- ` DisableAutomaticStates` in the Action protocol
- `setTriggerDescription` event for SD+
- `sortName` to provide a custom sort key for actions

## Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ extension EncoderAction {
extension Action {

// MARK: Defaults

public static var sortTitle: String { name }

public static var userTitleEnabled: Bool? { nil }

public static var propertyInspectorPath: String? { nil }
Expand Down
6 changes: 6 additions & 0 deletions Sources/StreamDeck/StreamDeck Plugin/Action/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public protocol Action {
/// The name of the action. This string is visible to the user in the actions list.
static var name: String { get }

/// A name used for sorting actions in the Stream Deck app.
///
/// By default this is `name`, but a custom value can be provided to sort
/// and group actions together.
static var sortName: String { get }

/// The unique identifier of the action.
///
/// It must be a uniform type identifier (UTI) that contains only lowercase alphanumeric characters (a-z, 0-9), hyphen (-), and period (.).
Expand Down

0 comments on commit 6584951

Please sign in to comment.