Fixing a small error

This commit is contained in:
Vishal 2023-09-22 07:40:00 +05:30 committed by GitHub
parent 034094d0a3
commit 7b278eb53d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -718,11 +718,16 @@ class EditProfileWindow(bui.Window):
else '???'
)
if len(name) > 10 and not (self._global or self._is_account_profile):
name = name.strip()
display_name = ((name[:10] + '...')
if len(name) > 10
else name
)
bui.textwidget(
edit=self._clipped_name_text,
text=bui.Lstr(
resource='inGameClippedNameText',
subs=[('${NAME}', name[:10] + '...')],
subs=[('${NAME}', display_name)],
),
)
else: