Display nicks with hashed color

This commit is contained in:
Joscha 2022-07-02 17:23:30 +02:00
parent 37d10821a4
commit 11422801b0
8 changed files with 92 additions and 6 deletions

View file

@ -2,10 +2,12 @@ use std::mem;
use async_trait::async_trait;
use chrono::{DateTime, TimeZone, Utc};
use crossterm::style::ContentStyle;
use rusqlite::types::{FromSql, FromSqlError, ToSqlOutput, Value, ValueRef};
use rusqlite::{named_params, params, Connection, OptionalExtension, ToSql, Transaction};
use tokio::sync::{mpsc, oneshot};
use crate::euph;
use crate::euph::api::{Message, Snowflake, Time};
use crate::store::{Msg, MsgStore, Path, Tree};
@ -65,6 +67,10 @@ impl Msg for EuphMsg {
self.nick.clone()
}
fn nick_style(&self) -> ContentStyle {
euph::nick_style(&self.nick)
}
fn content(&self) -> String {
self.content.trim().to_string()
}