mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 20:26:42 +01:00
wip: refactor pt.23: 47 errors
This commit is contained in:
parent
e7e57cea1e
commit
ff4698d046
3 changed files with 31 additions and 83 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use crate::*;
|
||||
use tek_api::Transport;
|
||||
|
||||
pub type TransportApp = AppContainer<
|
||||
Tui,
|
||||
|
|
@ -13,13 +12,12 @@ pub type TransportApp = AppContainer<
|
|||
impl TryFrom<&Arc<RwLock<JackClient>>> for TransportApp {
|
||||
type Error = Box<dyn std::error::Error>;
|
||||
fn try_from (jack: &Arc<RwLock<JackClient>>) -> Usually<Self> {
|
||||
let model = Arc::new(RwLock::new(Transport {
|
||||
let model = Arc::new(RwLock::new(TransportModel {
|
||||
metronome: false,
|
||||
transport: jack.read().unwrap().transport(),
|
||||
jack: jack.clone(),
|
||||
clock: Arc::new(Clock::from(Instant::default()))
|
||||
}));
|
||||
|
||||
Ok(Self::new(
|
||||
&model,
|
||||
TransportView::from(&model),
|
||||
|
|
@ -33,8 +31,8 @@ impl TryFrom<&Arc<RwLock<JackClient>>> for TransportApp {
|
|||
/// Stores and displays time-related info.
|
||||
#[derive(Debug)]
|
||||
pub struct TransportView<E: Engine> {
|
||||
_engine: PhantomData<E>,
|
||||
pub model: Arc<RwLock<Transport>>,
|
||||
_engine: PhantomData<E>,
|
||||
pub model: TransportModel,
|
||||
pub focus: TransportViewFocus,
|
||||
pub focused: bool,
|
||||
pub size: Measure<E>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue