summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Beharry <109764059+jshivabeharry@users.noreply.github.com>2022-08-30 13:51:31 -0400
committerGitHub <noreply@github.com>2022-08-30 13:51:31 -0400
commit88deacf68718258f530ff42ff2a5d80ae622f980 (patch)
treed2b96d12e15794aa163b92b575a2556b62ab5be2
parent3bf1448dddaaacc5d32612b3b06ab66a64e7b576 (diff)
downloadsdl_ios-88deacf68718258f530ff42ff2a5d80ae622f980.tar.gz
Apply suggestions from code review
Co-authored-by: Joel Fischer <joeljfischer@gmail.com>
-rw-r--r--SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.h6
-rw-r--r--SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.m2
2 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.h b/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.h
index 6273dd8b6..ebdab578b 100644
--- a/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.h
+++ b/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.h
@@ -38,9 +38,9 @@ typedef void(^CurrentDataUpdatedHandler)(SDLTextAndGraphicState *__nullable newS
/// @param updateCompletionHandler The handler potentially passed by the developer to be called when the update finishes
- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager currentCapabilities:(SDLWindowCapability *)currentCapabilities currentScreenData:(SDLTextAndGraphicState *)currentData newState:(SDLTextAndGraphicState *)newState currentScreenDataUpdatedHandler:(CurrentDataUpdatedHandler)currentDataUpdatedHandler updateCompletionHandler:(nullable SDLTextAndGraphicUpdateCompletionHandler)updateCompletionHandler;
-/// Changes updated state to remove potential errors from previous update operations
-/// @param errorData A updated state that failed in a previous operation that will be used to filter out erroneous data
-- (void)updateStateDataWithErrorData:(SDLTextAndGraphicState *)errorData;
+/// Changes updated state to remove failed updates from previous update operations. This will find and revert those failed updates back to current screen data so that we don't duplicate the failure.
+/// @param errorState A updated state that failed in a previous operation that will be used to filter out erroneous data
+- (void)updateTargetStateWithErrorState:(SDLTextAndGraphicState *)errorState;
@end
diff --git a/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.m b/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.m
index 2bce0d7d3..e726f5d57 100644
--- a/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.m
+++ b/SmartDeviceLink/private/SDLTextAndGraphicUpdateOperation.m
@@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)updateStateDataWithErrorData:(SDLTextAndGraphicState *)errorData {
- self.updatedState.textField1 = errorData.textField1 == self.updatedState.textField1 ? self.currentScreenData.textField1 : self.updatedState.textField1;
+ self.updatedState.textField1 = (errorData.textField1 == self.updatedState.textField1) ? self.currentScreenData.textField1 : self.updatedState.textField1;
self.updatedState.textField2 = errorData.textField2 == self.updatedState.textField2 ? self.currentScreenData.textField2 : self.updatedState.textField2;
self.updatedState.textField3 = errorData.textField3 == self.updatedState.textField3 ? self.currentScreenData.textField3 : self.updatedState.textField3;
self.updatedState.textField4 = errorData.textField4 == self.updatedState.textField4 ? self.currentScreenData.textField4 : self.updatedState.textField4;