Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScreenManager's endUpdates() completion block never executes in case changes are not related to TextAndGraphicManager #1942

Open
FrankElias77 opened this issue Mar 15, 2021 · 0 comments
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers

Comments

@FrankElias77
Copy link
Contributor

FrankElias77 commented Mar 15, 2021

Bug Report

The ScreenManager's endUpdates(completionHandler:) never executes in case the code executed between screenManager.beginUpdates() and screenManager.endUpdates(completionHandler:) are not related to the TextAndGraphicManager

SDLScreenManager.m:

- (void)endUpdatesWithCompletionHandler:(nullable SDLScreenManagerUpdateCompletionHandler)handler {
    self.softButtonManager.batchUpdates = NO;
    self.textAndGraphicManager.batchUpdates = NO;
    [self.textAndGraphicManager updateWithCompletionHandler:handler];
}

The handler only returns in SDLTextAndGraphicUpdateOperation 's finishOperation func and ignores the other managers(e.g. MenuManager, SoftButtonManager)

Reproduction Steps
      let state = SDLSoftButtonState(stateName: "1", text: "Button 1", artwork: nil)
      let button = SDLSoftButtonObject(name: "button", state: state, handler: nil)

      self.screenManager.beginUpdates()
      self.screenManager.softButtonObjects = [button]
      self.screenManager.endUpdates { (err) in
          let result: SmokeTestResult
          if let error = err {
              result = SmokeTestResult(success: false, info: "\(error)")
          } else {
              result = SmokeTestResult(success: true)
          }

          completionHandler(result)
      }
Expected Behavior

screenManager.endUpdates completion block should execute.

Observed Behavior

screenManager.endUpdates completion block does not get any response.

OS & Version Information
  • iOS Version: N/A
  • SDL iOS Version: Branch develop
  • Testing Against: Manticore
Test Case, Sample Code, and / or Example App

This bug was found while working on Smoke Tester app

@FrankElias77 FrankElias77 added bug A defect in the library manager-screen Relating to the manager layer - screen managers labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers
Projects
None yet
Development

No branches or pull requests

1 participant