diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-07-10 16:25:49 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2018-07-10 16:25:49 -0400 |
commit | 06bd70ba0fc32344144491a9c860d1e397b361ec (patch) | |
tree | d61b870a99b87879222584004265ad317db7d4cb | |
parent | 906c99ab2e621e9e710ad0cdf57eaab8d2d7fe24 (diff) | |
download | sdl_ios-06bd70ba0fc32344144491a9c860d1e397b361ec.tar.gz |
Fixed buttons being reset when transitioning to a new template if unused
-rw-r--r-- | SmartDeviceLink/SDLSoftButtonManager.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLSoftButtonManager.m b/SmartDeviceLink/SDLSoftButtonManager.m index 95158b117..29243c5cb 100644 --- a/SmartDeviceLink/SDLSoftButtonManager.m +++ b/SmartDeviceLink/SDLSoftButtonManager.m @@ -352,7 +352,9 @@ NS_ASSUME_NONNULL_BEGIN self.displayCapabilities = response.displayCapabilities; // Auto-send an updated Show - [self updateWithCompletionHandler:nil]; + if (self.softButtonObjects.count > 0) { + [self updateWithCompletionHandler:nil]; + } } - (void)sdl_hmiStatusNotification:(SDLRPCNotificationNotification *)notification { @@ -363,7 +365,7 @@ NS_ASSUME_NONNULL_BEGIN // Auto-send an updated show if we were in NONE and now we are not if ([oldHMILevel isEqualToString:SDLHMILevelNone] && ![self.currentLevel isEqualToString:SDLHMILevelNone] && self.waitingOnHMILevelUpdateToUpdate) { - [self sdl_updateWithCompletionHandler:nil]; + [self updateWithCompletionHandler:nil]; } } |