Skip to content
Snippets Groups Projects
Commit 5a06718d authored by Mateusz Żebrak's avatar Mateusz Żebrak
Browse files

Remove misleading action prefix in Form

parent 8eccf77d
No related branches found
No related tags found
2 merge requests!600v1.27.5.21 Release,!558Remove welcome profile from TUIWorld, set TUIWorld profile during CreateProfile wizard instead
...@@ -43,7 +43,7 @@ class Form(Contextual[ContextT], CliveScreen[None]): ...@@ -43,7 +43,7 @@ class Form(Contextual[ContextT], CliveScreen[None]):
def _skip_during_push_screen(self) -> list[ScreenBuilder[ContextT]]: def _skip_during_push_screen(self) -> list[ScreenBuilder[ContextT]]:
return [] return []
def action_next_screen(self) -> None: def next_screen(self) -> None:
if not self.__check_valid_range(self.__current_screen_index + 1): if not self.__check_valid_range(self.__current_screen_index + 1):
return return
...@@ -51,12 +51,12 @@ class Form(Contextual[ContextT], CliveScreen[None]): ...@@ -51,12 +51,12 @@ class Form(Contextual[ContextT], CliveScreen[None]):
if self.__is_current_screen_to_skip(): if self.__is_current_screen_to_skip():
self.__skipped_screens.add(self.current_screen) self.__skipped_screens.add(self.current_screen)
self.action_next_screen() self.next_screen()
return return
self.__push_current_screen() self.__push_current_screen()
def action_previous_screen(self) -> None: def previous_screen(self) -> None:
if not self.__check_valid_range(self.__current_screen_index - 1): if not self.__check_valid_range(self.__current_screen_index - 1):
return return
...@@ -64,7 +64,7 @@ class Form(Contextual[ContextT], CliveScreen[None]): ...@@ -64,7 +64,7 @@ class Form(Contextual[ContextT], CliveScreen[None]):
if self.__is_current_screen_skipped(): if self.__is_current_screen_skipped():
self.__skipped_screens.discard(self.current_screen) self.__skipped_screens.discard(self.current_screen)
self.action_previous_screen() self.previous_screen()
return return
# self.dismiss() won't work here because self is Form and not FormScreen # self.dismiss() won't work here because self is Form and not FormScreen
......
...@@ -64,7 +64,7 @@ class FormScreen(FormScreenBase[ContextT], ABC): ...@@ -64,7 +64,7 @@ class FormScreen(FormScreenBase[ContextT], ABC):
await self._back_to_unlock_screen() await self._back_to_unlock_screen()
return return
self._owner.action_previous_screen() self._owner.previous_screen()
@on(NextScreenButton.Pressed) @on(NextScreenButton.Pressed)
@on(CliveInput.Submitted) @on(CliveInput.Submitted)
...@@ -83,7 +83,7 @@ class FormScreen(FormScreenBase[ContextT], ABC): ...@@ -83,7 +83,7 @@ class FormScreen(FormScreenBase[ContextT], ABC):
self.post_message(self.Finish()) self.post_message(self.Finish())
return return
self._owner.action_next_screen() self._owner.next_screen()
@abstractmethod @abstractmethod
async def validate(self) -> ValidationFail | ValidationSuccess | None: async def validate(self) -> ValidationFail | ValidationSuccess | None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment