8000 fix(graph): show Drafts from the cache after a send (#538) by hanthor · Pull Request #591 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

- **Fixed: a message sent from a Microsoft account could end in a 404** (#538).
A message that had been saved as a draft, often one with pictures in it,
went out, yet the status bar said it could not be loaded. Microsoft keeps a
message in Drafts until it has gone, and the app read Drafts in that moment,
then asked for the message after it had moved to Sent. Drafts is now updated
without asking the server.

- **Fixed: a PDF with a password froze the app** (#582). Opening one, or any
other PDF that cannot be read, kept the app busy until it was killed. The
preview now says **No preview available**, and **Open** hands the file to
Expand Down
27 changes: 11 additions & 16 deletions src/worker/graph/handle_send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,17 @@ impl<E: Fn(WorkerEvent)> GraphWorker<E> {
emit,
)
.await;
if let Some(token) = graph_token(account, emit).await {
if let Ok(messages) = graph_load_folder(
&token,
account_id,
o.folder_id,
&o.path,
cache.as_ref(),
state,
)
.await
{
emit(WorkerEvent::Messages {
folder_id: o.folder_id,
messages,
});
}
// Drafts as the cache has it, not listed again:
// sendMail leaves the message in Drafts until
// transport moves it to Sent Items under a new id, so
// a listing now could keep a copy whose id is about
// to go, and the conversation on screen would ask for
// its body and get a 404 (#538).
if let Some(c) = cache.as_ref() {
emit(WorkerEvent::Messages {
folder_id: o.folder_id,
messages: c.load_messages(account_id, &o.path, o.folder_id),
});
}
}
}
Expand Down
0