Reduce memory footprint, fix alloc vec error
This commit is contained in:
parent
8478f5d112
commit
97325d72ef
@ -128,8 +128,8 @@ impl AsyncHandler<CreateIssuePayload> for WebSocketActor {
|
||||
issue_type: msg.issue_type,
|
||||
issue_status_id: msg.issue_status_id,
|
||||
priority: msg.priority,
|
||||
description: msg.description,
|
||||
description_text: msg.description_text,
|
||||
description: msg.description.clone(),
|
||||
description_text: msg.description_text.or(msg.description),
|
||||
estimate: msg.estimate,
|
||||
time_spent: msg.time_spent,
|
||||
time_remaining: msg.time_remaining,
|
||||
|
@ -77,7 +77,7 @@ impl<'l> StyledMdEditor<'l> {
|
||||
let StyledMdEditor {
|
||||
id,
|
||||
initial_text,
|
||||
text: _,
|
||||
text,
|
||||
html,
|
||||
mode,
|
||||
update_event,
|
||||
@ -94,7 +94,7 @@ impl<'l> StyledMdEditor<'l> {
|
||||
let text_area = StyledTextarea {
|
||||
id: Some(id),
|
||||
height: 40,
|
||||
value: initial_text,
|
||||
value: if text.is_empty() { initial_text } else { text },
|
||||
update_event,
|
||||
..Default::default()
|
||||
}
|
||||
|
@ -15,6 +15,11 @@ pub fn update(msg: &Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
modal.update_states(msg, orders);
|
||||
|
||||
match msg {
|
||||
Msg::ResourceChanged(ResourceKind::Issue, OperationKind::SingleRemoved, Some(id)) => {
|
||||
if modal.id == *id {
|
||||
orders.send_msg(crate::Msg::ModalDropped);
|
||||
}
|
||||
}
|
||||
Msg::ResourceChanged(ResourceKind::Issue, OperationKind::SingleModified, Some(id)) => {
|
||||
let m = model.issues_by_id.get(id).cloned();
|
||||
if let Some(issue) = m {
|
||||
|
Loading…
Reference in New Issue
Block a user