summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-06-24 11:46:40 -0400
committerNicoleYarroch <nicole@livio.io>2020-06-24 11:46:40 -0400
commitc51bf1aae391fe8e4ba399deaba6a0db378d12e8 (patch)
tree935a8a6ba91c4b5ab20f8d3b1ccbdec46c52722a
parentd6fb4f15606bf53d5093b6f2ece598f48a4f72da (diff)
downloadsdl_ios-c51bf1aae391fe8e4ba399deaba6a0db378d12e8.tar.gz
Updated docs and added logs
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r--SmartDeviceLink/SDLSoftButtonReplaceOperation.m13
1 files changed, 7 insertions, 6 deletions
diff --git a/SmartDeviceLink/SDLSoftButtonReplaceOperation.m b/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
index 85178807e..b4a31b41e 100644
--- a/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
+++ b/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
@@ -52,24 +52,25 @@ NS_ASSUME_NONNULL_BEGIN
// Check the state of our images
if (![self sdl_supportsSoftButtonImages]) {
- // We don't support images at all
+ // The modules does not support images
SDLLogW(@"Soft button images are not supported. Attempting to send text-only soft buttons. If any button does not contain text, no buttons will be sent.");
- // Send text buttons if all the soft buttons have text
+ // Send text-only buttons if all current states for the soft buttons have text
__weak typeof(self) weakself = self;
[self sdl_sendCurrentStateTextOnlySoftButtonsWithCompletionHandler:^(BOOL success) {
if (!success) {
- SDLLogE(@"Head unit does not support images and some of the soft buttons do not have text, so none of the buttons will be sent.");
+ SDLLogE(@"Buttons will not be sent because the module does not support images and some of the buttons do not have text");
}
[weakself finishOperation];
}];
} else if (![self sdl_allStateImagesAreUploaded]) {
- // If there are images in the first soft button state that have not yet been uploaded, send a text-only version of the soft buttons (this will only happen if all the first button states have text)
+ // If there are images in the first soft button state that have not yet been uploaded, send a text-only version of the soft buttons (the text-only buttons will only be sent if all the first button states have text)
[self sdl_sendCurrentStateTextOnlySoftButtonsWithCompletionHandler:^(BOOL success) {}];
// Upload images used in the first soft button state
__weak typeof(self) weakSelf = self;
[self sdl_uploadInitialStateImagesWithCompletionHandler:^{
+ SDLLogV(@"Finished sending images for the first soft button states");
// Now that the images have been uploaded, send the soft buttons with images
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf sdl_sendCurrentStateSoftButtonsWithCompletionHandler:^{
@@ -77,13 +78,13 @@ NS_ASSUME_NONNULL_BEGIN
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf sdl_uploadOtherStateImagesWithCompletionHandler:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
- SDLLogV(@"Finished sending other images for soft buttons");
+ SDLLogV(@"Finished sending images for the other soft button states");
[strongSelf finishOperation];
}];
}];
}];
} else {
- // All the images are already uploaded. Send initial soft buttons w/ images.
+ // All the images are already uploaded. Send initial soft buttons with images.
__weak typeof(self) weakself = self;
[self sdl_sendCurrentStateSoftButtonsWithCompletionHandler:^{
__strong typeof(weakself) strongself = weakself;