|
|
@@ -204,8 +204,10 @@ extension Main {
|
|
|
/*
|
|
|
Reclassification is needed for Medtronic pumps for 'Pump error:' RileyLink related messages.
|
|
|
For details, see https://discord.com/channels/1020905149037813862/1338245444186279946/1343469793013141525.
|
|
|
- Reclassification of Info type messages is based on APSManager.APSError enum values.
|
|
|
- Currently, we only re-classify APSError.pumpError 'Pump error:' type to MessageType.error.
|
|
|
+ These messages are repeatedly displayed causing users to simply ignore them.
|
|
|
+ Reclassification of these Info type messages is based on APSManager.APSError enum values.
|
|
|
+ We reclassify APSError.pumpError and APSError.invalidPumpState as MessageType.info and MessageSubtype.pump.
|
|
|
+ This allows the user to disable these messages using using the 'Trio Notification' -> 'Always Notify Pump' setting.
|
|
|
MessageType.error messagges are always displayed to the user and the user cannot disable them.
|
|
|
Other APSManager.APSError remain as MessageType.info which allows users to disable them
|
|
|
using the 'Trio Notification' -> 'Always Notify Algorithm' setting.
|
|
|
@@ -216,8 +218,8 @@ extension Main {
|
|
|
case .info:
|
|
|
if let errorIndex = message.content.range(of: "error", options: .caseInsensitive) {
|
|
|
message.title = String(localized: "Error", comment: "Error title")
|
|
|
- if let errorPumpIndex = message.content.range(of: "Pump error:", options: .caseInsensitive) {
|
|
|
- message.type = .error
|
|
|
+ if APSError.pumpMatches(message: message.content) {
|
|
|
+ message.subtype = .pump
|
|
|
}
|
|
|
} else {
|
|
|
message.title = String(localized: "Info", comment: "Info title")
|