Swapping de-duplicated menu items causes incorrect unique titles
joeljfischer opened this issue · 1 comments
joeljfischer commented
Bug Report
In certain circumstances, the menu manager will not create a correct unique title for menu cells.
Reproduction Steps
- Disable secondary text (such as by modifying
SDLWindowCapability+ScreenManagerExtensions.m/hasTextFieldOfName
- Connect to a v7.0+ Core
- 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]
- Enter the menu and press "C"
- 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]
theresalech commented
Corresponding Java Suite issue: smartdevicelink/sdl_java_suite#1723