Skip to content

Commit

Permalink
Fix MessageBuilder not using fallback pronoun
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatStella7922 committed Nov 22, 2023
1 parent 91a0bc6 commit e542b3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions dcbattwebhook-swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
55950C5C291DDCDF00F1CAD8 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55950C5B291DDCDF00F1CAD8 /* AboutView.swift */; };
55A9E5332AF7669F0091D1A6 /* HelpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A9E5322AF7669F0091D1A6 /* HelpView.swift */; };
55A9E5342AF7669F0091D1A6 /* HelpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A9E5322AF7669F0091D1A6 /* HelpView.swift */; };
55B23ECC2B0DBC960045CE26 /* MacSettingsUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B23ECB2B0DBC960045CE26 /* MacSettingsUtils.swift */; };
55B23ED02B0DC32B0045CE26 /* AutomationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B23ECF2B0DC32B0045CE26 /* AutomationsView.swift */; };
55B23ED12B0DC32B0045CE26 /* AutomationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B23ECF2B0DC32B0045CE26 /* AutomationsView.swift */; };
55B272002B03114800BD8A36 /* DiscordPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */; };
55B272012B03114800BD8A36 /* DiscordPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */; };
55B4E8E829316C0600492C77 /* MessageBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B4E8E729316C0600492C77 /* MessageBuilder.swift */; };
Expand Down Expand Up @@ -111,6 +114,8 @@
55950C59291DAC8400F1CAD8 /* SendBatteryInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendBatteryInfo.swift; sourceTree = "<group>"; };
55950C5B291DDCDF00F1CAD8 /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
55A9E5322AF7669F0091D1A6 /* HelpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpView.swift; sourceTree = "<group>"; };
55B23ECB2B0DBC960045CE26 /* MacSettingsUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacSettingsUtils.swift; sourceTree = "<group>"; };
55B23ECF2B0DC32B0045CE26 /* AutomationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomationsView.swift; sourceTree = "<group>"; };
55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscordPreviewView.swift; sourceTree = "<group>"; };
55B4E8E729316C0600492C77 /* MessageBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageBuilder.swift; sourceTree = "<group>"; };
55B4E8E92931742300492C77 /* EmbedStructs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmbedStructs.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -182,8 +187,8 @@
55E7AEAC29257AF1002E6869 /* SettingsUtils.swift */,
558CCBCE2B08513200FC4442 /* SettingsUtilsView.swift */,
550348D6291D84E1006551B0 /* SettingsView.swift */,
55B23ECF2B0DC32B0045CE26 /* AutomationsView.swift */,
557299C82936D5DF00D7523D /* WebhookSettingsView.swift */,
553CD2B32AF65288006D3402 /* MenuBarExtraView.swift */,
55A9E5322AF7669F0091D1A6 /* HelpView.swift */,
55950C5B291DDCDF00F1CAD8 /* AboutView.swift */,
55ED8937291F628700CB170C /* SettingsValidator.swift */,
Expand Down Expand Up @@ -216,9 +221,11 @@
554DEBE32B07E5AB009FF921 /* MacSupport */ = {
isa = PBXGroup;
children = (
55CE77552B0586390094B98D /* SettingsViewmacOS.swift */,
554DEBEB2B07F561009FF921 /* MacAppDelegate.swift */,
5508C7CE2B0D697F004A8F71 /* MacIOKit.swift */,
55B23ECB2B0DBC960045CE26 /* MacSettingsUtils.swift */,
55CE77552B0586390094B98D /* SettingsViewmacOS.swift */,
553CD2B32AF65288006D3402 /* MenuBarExtraView.swift */,
);
path = MacSupport;
sourceTree = "<group>";
Expand Down Expand Up @@ -339,6 +346,7 @@
5173E4182A78EE980076663F /* SettingsUtils.swift in Sources */,
558CCBD02B08513200FC4442 /* SettingsUtilsView.swift in Sources */,
55F26F412AF740E600AB8E1C /* WelcomeView.swift in Sources */,
55B23ED12B0DC32B0045CE26 /* AutomationsView.swift in Sources */,
558CCBD32B085A8500FC4442 /* FileHelper.swift in Sources */,
5173E4192A78EE980076663F /* ContentView.swift in Sources */,
5173E41A2A78EE980076663F /* HomeUIView.swift in Sources */,
Expand All @@ -365,6 +373,7 @@
55B4E8E829316C0600492C77 /* MessageBuilder.swift in Sources */,
554DEBEC2B07F561009FF921 /* MacAppDelegate.swift in Sources */,
557299C92936D5DF00D7523D /* WebhookSettingsView.swift in Sources */,
55B23ED02B0DC32B0045CE26 /* AutomationsView.swift in Sources */,
550348D7291D84E1006551B0 /* SettingsView.swift in Sources */,
55ED8938291F628700CB170C /* SettingsValidator.swift in Sources */,
55E7AEAD29257AF1002E6869 /* SettingsUtils.swift in Sources */,
Expand All @@ -378,6 +387,7 @@
55B4E8EA2931742300492C77 /* EmbedStructs.swift in Sources */,
553CD2B42AF65288006D3402 /* MenuBarExtraView.swift in Sources */,
55CE77562B0586390094B98D /* SettingsViewmacOS.swift in Sources */,
55B23ECC2B0DBC960045CE26 /* MacSettingsUtils.swift in Sources */,
558CCBCF2B08513200FC4442 /* SettingsUtilsView.swift in Sources */,
550348DD291DA3BC006551B0 /* HomeUIView.swift in Sources */,
55A9E5332AF7669F0091D1A6 /* HelpView.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion dcbattwebhook-swift/MessageBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func ConstructDiscordEmbed(isCurrentlyCharging: Bool, didGetPluggedIn: Bool, did
usrName = usrname
}
if let usrpronoun = defaults.string(forKey: "UsrPronoun") {
usrPronoun = usrpronoun
if !usrpronoun.isEmpty {usrPronoun = usrpronoun}
}
sendDeviceName = defaults.bool(forKey: "SendDeviceName")
sendDeviceModel = defaults.bool(forKey: "SendDeviceModel")
Expand Down

0 comments on commit e542b3f

Please sign in to comment.