Update euphoxide to version with id newtype wrappers
This commit is contained in:
parent
2d88513a28
commit
374c4c4f79
10 changed files with 131 additions and 114 deletions
|
|
@ -2,7 +2,7 @@ use std::collections::VecDeque;
|
|||
use std::sync::Arc;
|
||||
|
||||
use crossterm::style::{ContentStyle, Stylize};
|
||||
use euphoxide::api::{Data, Message, PacketType, SessionView, Snowflake, UserId};
|
||||
use euphoxide::api::{Data, Message, MessageId, PacketType, SessionId, SessionView};
|
||||
use euphoxide::conn::{Joined, Joining, Status};
|
||||
use parking_lot::FairMutex;
|
||||
use tokio::sync::oneshot::error::TryRecvError;
|
||||
|
|
@ -78,9 +78,9 @@ pub struct EuphRoom {
|
|||
popups: VecDeque<RoomPopup>,
|
||||
|
||||
chat: ChatState<euph::SmallMessage, EuphRoomVault>,
|
||||
last_msg_sent: Option<oneshot::Receiver<Snowflake>>,
|
||||
last_msg_sent: Option<oneshot::Receiver<MessageId>>,
|
||||
|
||||
nick_list: ListState<UserId>,
|
||||
nick_list: ListState<SessionId>,
|
||||
}
|
||||
|
||||
impl EuphRoom {
|
||||
|
|
@ -501,7 +501,7 @@ impl EuphRoom {
|
|||
if let RoomStatus::Connected(Status::Joined(joined)) = status {
|
||||
// TODO Fix euphoxide to use session_id as hash
|
||||
if let Some(id) = self.nick_list.cursor() {
|
||||
if id == joined.session.id {
|
||||
if id == joined.session.session_id {
|
||||
self.state = State::InspectSession(joined.session.clone());
|
||||
} else if let Some(session) = joined.listing.get(&id) {
|
||||
self.state = State::InspectSession(session.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue