Created a startup function for session.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
14
src/lib.rs
14
src/lib.rs
@@ -218,15 +218,10 @@ pub struct MoreThanText {
|
||||
impl MoreThanText {
|
||||
pub fn new() -> Self {
|
||||
let queue = Queue::new();
|
||||
let mut output = Self {
|
||||
queue: queue.clone(),
|
||||
};
|
||||
CreateDoc::start(queue.clone()); // needs to be first.
|
||||
Clock::start(queue.clone());
|
||||
CreateDoc::start(queue.clone());
|
||||
output
|
||||
.create_document(Session::document_definition())
|
||||
.unwrap();
|
||||
output
|
||||
Session::start(queue.clone());
|
||||
Self { queue: queue }
|
||||
}
|
||||
|
||||
pub fn client(&self) -> MTTClient {
|
||||
@@ -241,6 +236,7 @@ impl MoreThanText {
|
||||
MTTClient::new(self.queue.clone(), Some(id), lang)
|
||||
}
|
||||
|
||||
// /*
|
||||
fn new_session(lang: Option<Language>) -> ClientAction {
|
||||
let mut output = Addition::new(Session::doc_names()[0].clone());
|
||||
match lang {
|
||||
@@ -380,7 +376,7 @@ impl MoreThanText {
|
||||
self.queue.remove_sender(&sender_id);
|
||||
output
|
||||
}
|
||||
|
||||
// */
|
||||
pub fn get_document(&self, name: &str, id: &str) -> Result<String, MTTError> {
|
||||
if name == "page" {
|
||||
Ok("something".to_string())
|
||||
|
||||
Reference in New Issue
Block a user