messages now a bit different, less contructions

not constructing one for each possible message but only constructing when message happens
This commit is contained in:
2020-02-16 23:17:46 +01:00
parent 23c1ec33a1
commit e3792005ba
7 changed files with 52 additions and 51 deletions

View File

@@ -55,7 +55,7 @@ class ShowEditTranslation(ClickMessage):
translation.make_copy()
num_clusters = len(parent.translations)
model.modal_set(lambda: modals.edit_translation(
translation, cidx, num_clusters, EditTranslation(translation, cidx)))
translation, cidx, num_clusters, (EditTranslation, translation, cidx)))
class ShowAddTranslation(ClickMessage):
@@ -68,7 +68,7 @@ class ShowAddTranslation(ClickMessage):
translation,
-1,
len(chosen_sense_or_example.translations),
AddTranslation(translation, -1, chosen_sense_or_example)))
(AddTranslation, translation, -1, chosen_sense_or_example)))
class ShowEntryLabelsEdit(ClickMessage):