persistence + proper disconnect
This commit is contained in:
@@ -18,7 +18,7 @@ pub fn main_view(client: &mut Client, network: NetSender) -> WidgetId {
|
||||
.any()
|
||||
}
|
||||
|
||||
pub fn msg_widget(msg: Msg) -> impl WidgetLike<FnTag> {
|
||||
pub fn msg_widget(msg: NetMsg) -> impl WidgetLike<FnTag> {
|
||||
let content = text(msg.content)
|
||||
.editable(false)
|
||||
.size(SIZE)
|
||||
@@ -61,7 +61,7 @@ pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Sized
|
||||
.clone()
|
||||
.id_on(Submit, move |id, client: &mut Client, _| {
|
||||
let content = client.ui.text(id).take();
|
||||
let msg = Msg {
|
||||
let msg = NetMsg {
|
||||
content: content.clone(),
|
||||
user: client.username.clone(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user