rename some view structs

This commit is contained in:
🪞👃🪞 2024-11-25 19:37:40 +01:00
parent b2386b2992
commit 83e2a285dd
4 changed files with 17 additions and 19 deletions

View file

@ -1,6 +1,6 @@
use crate::*;
pub struct PhraseView2<'a> {
pub struct PhraseView<'a> {
pub(crate) focused: bool,
pub(crate) entered: bool,
pub(crate) phrase: &'a Option<Arc<RwLock<Phrase>>>,
@ -13,7 +13,7 @@ pub struct PhraseView2<'a> {
pub(crate) now: &'a Arc<Pulse>,
}
impl<'a, T: HasEditor> From<&'a T> for PhraseView2<'a> {
impl<'a, T: HasEditor> From<&'a T> for PhraseView<'a> {
fn from (state: &'a T) -> Self {
Self {
focused: state.editor_focused(),
@ -30,7 +30,7 @@ impl<'a, T: HasEditor> From<&'a T> for PhraseView2<'a> {
}
}
impl<'a> Content for PhraseView2<'a> {
impl<'a> Content for PhraseView<'a> {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
let Self {