Discord: drop enableReactions config
This commit is contained in:
committed by
Peter Steinberger
parent
6bab813bb3
commit
0c38f2df2a
@@ -310,12 +310,6 @@ struct ConnectionsSettings: View {
|
||||
TextField("20", text: self.$store.discordHistoryLimit)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
GridRow {
|
||||
self.gridLabel("Reactions")
|
||||
Toggle("", isOn: self.$store.discordEnableReactions)
|
||||
.labelsHidden()
|
||||
.toggleStyle(.checkbox)
|
||||
}
|
||||
GridRow {
|
||||
self.gridLabel("Slash command")
|
||||
Toggle("", isOn: self.$store.discordSlashEnabled)
|
||||
|
||||
@@ -174,7 +174,6 @@ final class ConnectionsStore {
|
||||
var discordGroupChannels: String = ""
|
||||
var discordMediaMaxMb: String = ""
|
||||
var discordHistoryLimit: String = ""
|
||||
var discordEnableReactions = true
|
||||
var discordSlashEnabled = false
|
||||
var discordSlashName: String = ""
|
||||
var discordSlashSessionPrefix: String = ""
|
||||
@@ -420,7 +419,6 @@ final class ConnectionsStore {
|
||||
} else {
|
||||
self.discordHistoryLimit = ""
|
||||
}
|
||||
self.discordEnableReactions = discord?["enableReactions"]?.boolValue ?? true
|
||||
let slash = discord?["slashCommand"]?.dictionaryValue
|
||||
self.discordSlashEnabled = slash?["enabled"]?.boolValue ?? false
|
||||
self.discordSlashName = slash?["name"]?.stringValue ?? ""
|
||||
@@ -644,12 +642,6 @@ final class ConnectionsStore {
|
||||
discord.removeValue(forKey: "historyLimit")
|
||||
}
|
||||
|
||||
if self.discordEnableReactions {
|
||||
discord.removeValue(forKey: "enableReactions")
|
||||
} else {
|
||||
discord["enableReactions"] = false
|
||||
}
|
||||
|
||||
var slash: [String: Any] = (discord["slashCommand"] as? [String: Any]) ?? [:]
|
||||
if self.discordSlashEnabled {
|
||||
slash["enabled"] = true
|
||||
|
||||
Reference in New Issue
Block a user