Skip to content

Commit

Permalink
Add disableAutomaticStates
Browse files Browse the repository at this point in the history
  • Loading branch information
emorydunn committed Dec 14, 2023
1 parent fe98d41 commit defc065
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ extension Action {
public static var tooltip: String? { nil }

public static var visibleInActionsList: Bool? { nil }


public static var disableAutomaticStates: Bool? { nil }

/// The Action's UUID.
public var uuid: String {
type(of: self).uuid
Expand Down
7 changes: 6 additions & 1 deletion Sources/StreamDeck/Support Models/PluginManifest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ struct PluginAction: Codable {

let userTitleEnabled: Bool?

let disableAutomaticStates: Bool?

/// Initialize a new action.
init(name: String,
uuid: String,
Expand All @@ -290,7 +292,8 @@ struct PluginAction: Codable {
supportedInMultiActions: Bool? = nil,
tooltip: String? = nil,
visibleInActionsList: Bool? = nil,
userTitleEnabled: Bool? = nil) {
userTitleEnabled: Bool? = nil,
disableAutomaticStates: Bool? = nil) {
self.name = name
self.uuid = uuid
self.icon = icon
Expand All @@ -299,6 +302,7 @@ struct PluginAction: Codable {
self.tooltip = tooltip
self.visibleInActionsList = visibleInActionsList
self.userTitleEnabled = userTitleEnabled
self.disableAutomaticStates = disableAutomaticStates

if let states = states {
self.states = states
Expand All @@ -321,6 +325,7 @@ struct PluginAction: Codable {
self.tooltip = action.tooltip
self.visibleInActionsList = action.visibleInActionsList
self.userTitleEnabled = action.userTitleEnabled
self.disableAutomaticStates = action.disableAutomaticStates

if let states = action.states {
self.states = states
Expand Down

0 comments on commit defc065

Please sign in to comment.