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

Swapping de-duplicated menu items causes incorrect unique titles #2027

Closed
joeljfischer opened this issue Jul 29, 2021 · 1 comment · Fixed by #1901
Closed

Swapping de-duplicated menu items causes incorrect unique titles #2027

joeljfischer opened this issue Jul 29, 2021 · 1 comment · Fixed by #1901
Assignees
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers

Comments

@joeljfischer
Copy link
Contributor

Bug Report

In certain circumstances, the menu manager will not create a correct unique title for menu cells.

Reproduction Steps
  1. Disable secondary text (such as by modifying SDLWindowCapability+ScreenManagerExtensions.m/hasTextFieldOfName
  2. Connect to a v7.0+ Core
  3. Create a menu like the following:
let cell1 = SDLMenuCell(title: "A", secondaryText: "Secondary Text", tertiaryText: nil, icon: nil, secondaryArtwork: nil, voiceCommands: nil) { _ in
    print("Cell 1")
}
let cell2 = SDLMenuCell(title: "A", secondaryText: nil, tertiaryText: nil, icon: nil, secondaryArtwork: nil, voiceCommands: nil) { _ in
    print("Cell 2")
}
let cell3 = SDLMenuCell(title: "C", secondaryText: nil, tertiaryText: nil, icon: nil, secondaryArtwork: nil, voiceCommands: nil) { _ in
    manager.screenManager.menu = [cell2, cell1];
}

return [cell1, cell2, cell3]
  1. Enter the menu and press "C"
  2. Go back to the menu.
Expected Behavior

It should display A and A(2) again (or perhaps A(2) and A?)

Observed Behavior

It displays A and A

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: v7.2.0
  • Testing Against: Manticore
Test Case, Sample Code, and / or Example App

[Paste a link to a PR, gist, or other code that exemplifies this behavior]

@joeljfischer joeljfischer added bug A defect in the library manager-screen Relating to the manager layer - screen managers labels Jul 29, 2021
@joeljfischer joeljfischer self-assigned this Jul 29, 2021
@theresalech
Copy link
Contributor

Corresponding Java Suite issue: smartdevicelink/sdl_java_suite#1723

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

Successfully merging a pull request may close this issue.

2 participants