compose_validate: Make validate single source for error messages.

Instead of relying on different functions to get error messages,
we use `validate` to get the error message for the current compose
state.

This fixes a bug where compose tooltip was not defined when
compose state was not valid.
This commit is contained in:
Aman Agrawal
2025-03-23 12:03:07 +05:30
committed by Tim Abbott
parent 0463f3ab1e
commit 01c5197dd9
2 changed files with 115 additions and 61 deletions

View File

@@ -41,7 +41,6 @@ const compose_fade = mock_esm("../src/compose_fade", {
update_all: noop,
});
const compose_pm_pill = mock_esm("../src/compose_pm_pill", {
get_user_ids_string: () => "",
get_user_ids: () => [],
});
const compose_ui = mock_esm("../src/compose_ui", {