add toast history *before* emitting toast signal

This commit is contained in:
Lera Elvoé 2024-05-20 09:18:33 +03:00
parent 33425e8436
commit 903a801ba9
No known key found for this signature in database

View file

@ -59,12 +59,12 @@ func toast_error(text: String) -> void:
func toast(text: String, type: LogType) -> void: func toast(text: String, type: LogType) -> void:
log_toast.emit(text, type)
toast_history.append( toast_history.append(
{ {
"text": text, "text": text,
"type": type, "type": type,
} }
) )
log_toast.emit(text, type)
if OS.has_feature("editor"): if OS.has_feature("editor"):
prints("(t)", LogType.keys()[type].capitalize(), text) prints("(t)", LogType.keys()[type].capitalize(), text)