FTXUI
FTXUI copied to clipboard
Dynamic text length from `ConstStringListRef::Adapter` in a `Menu` breaks rendering
So in this project, I just implemented that if you are in a voice call with someone, it puts a telephone emoji next to your name.
As soon as that happens, you can see above, the rendering gets bumped over by a character - like the Menu render assumes that Menu items length won't ever change after they have been initially created.
Souce:
- Setup of my menu: https://github.com/markmandel/discord-social-tui/blob/9b1370d812e3799bd4d1da09085190e90cf93062/src/app/app.cpp#L46-L48
- Friend formatted name: https://github.com/markmandel/discord-social-tui/blob/9b1370d812e3799bd4d1da09085190e90cf93062/src/app/friend.cpp#L43-L67
- Implementation of
[]operation forConstStringListRef::Adapter: https://github.com/markmandel/discord-social-tui/blob/9b1370d812e3799bd4d1da09085190e90cf93062/src/app/friend.cpp#L214-L219
Oh boy! I was trying to come up with a workaround, so added the telephone to the end of everything... and it's the telephone?
Looks like this might be a duplicate of #929 - lemme know if it is, and I'll close this one.
Thanks @markmandel , Yes this looks like a duplicate of #929.
If you know of how to fix it. I would happily merge a PR.