mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'coffee-compiler/cap_long_paste_input' into 'master'
Remove client side chat message capping See merge request veloren/veloren!4558
This commit is contained in:
commit
676b678b52
@ -26,7 +26,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Localization support for prompt dialogs, diary sections, trade and group invitations, command descriptions.
|
- Localization support for prompt dialogs, diary sections, trade and group invitations, command descriptions.
|
||||||
- Added Freezing Potion
|
- Added Freezing Potion
|
||||||
- Clear command to delete chat messages.
|
- Clear command to delete chat messages.
|
||||||
- Chat message capping to prevent too long messages before sending.
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -504,10 +504,7 @@ impl<'a> Widget for Chat<'a> {
|
|||||||
.set(state.ids.chat_input, ui)
|
.set(state.ids.chat_input, ui)
|
||||||
{
|
{
|
||||||
input.retain(|c| c != '\n');
|
input.retain(|c| c != '\n');
|
||||||
|
state.update(|s| s.input.message = input);
|
||||||
if input.len() <= ChatMsg::MAX_BYTES_PLAYER_CHAT_MSG {
|
|
||||||
state.update(|s| s.input.message = input);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user