Fully add a lua api #11

Merged
antifallobst merged 19 commits from commands into master 2023-07-21 18:57:04 +00:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 734328787e - Show all commits

View File

@ -9,7 +9,7 @@ use tui::{
use crate::{app::status::Room, ui::central::InputPosition};
pub fn init<'a>(room: Option<&Room>, colors: &Vec<Color>) -> Result<(List<'a>, ListState)> {
pub fn init<'a>(room: Option<&'a Room>, colors: &Vec<Color>) -> Result<(List<'a>, ListState)> {
let content = match room {
Some(room) => get_content_from_room(room).context("Failed to get content from room")?,
None => vec![ListItem::new(Text::styled(

View File

@ -6,7 +6,7 @@ use tui::{
use crate::{app::status::Room, ui::central::InputPosition};
pub fn init<'a>(room: Option<&Room>, colors: &Vec<Color>) -> Paragraph<'a> {
pub fn init<'a>(room: Option<&'a Room>, colors: &Vec<Color>) -> Paragraph<'a> {
let mut room_info_content = Text::default();
if let Some(room) = room {
room_info_content.extend(Text::styled(room.name(), Style::default().fg(Color::Cyan)));

View File

@ -6,7 +6,7 @@ use tui::{
use crate::{app::status::Status, ui::central::InputPosition};
pub fn init<'a>(status: &Status, colors: &Vec<Color>) -> List<'a> {
pub fn init<'a>(status: &'a Status, colors: &Vec<Color>) -> List<'a> {
let rooms_content: Vec<_> = status
.rooms()
.iter()

View File

@ -7,7 +7,7 @@ use tui::{
use crate::{app::status::Status, ui::central::InputPosition};
pub fn init<'a>(status: &Status, colors: &Vec<Color>) -> Paragraph<'a> {
pub fn init<'a>(status: &'a Status, colors: &Vec<Color>) -> Paragraph<'a> {
let mut status_content = Text::styled(
status.account_name(),
Style::default().add_modifier(Modifier::BOLD),