summaryrefslogtreecommitdiff
path: root/Userland/Applications/Mail/MailWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/Mail/MailWidget.cpp')
-rw-r--r--Userland/Applications/Mail/MailWidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Applications/Mail/MailWidget.cpp b/Userland/Applications/Mail/MailWidget.cpp
index 5d9c8487b5..da4140dbda 100644
--- a/Userland/Applications/Mail/MailWidget.cpp
+++ b/Userland/Applications/Mail/MailWidget.cpp
@@ -132,9 +132,9 @@ bool MailWidget::connect_and_login()
auto connection_promise = m_imap_client->connection_promise();
VERIFY(!connection_promise.is_null());
- connection_promise->await();
+ MUST(connection_promise->await());
- auto response = m_imap_client->login(username, password)->await().release_value();
+ auto response = MUST(m_imap_client->login(username, password)->await()).release_value();
if (response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to login. The server says: '{}'", response.response_text());
@@ -142,7 +142,7 @@ bool MailWidget::connect_and_login()
return false;
}
- response = m_imap_client->list(""sv, "*"sv)->await().release_value();
+ response = MUST(m_imap_client->list(""sv, "*"sv)->await()).release_value();
if (response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to retrieve mailboxes. The server says: '{}'", response.response_text());
@@ -163,7 +163,7 @@ bool MailWidget::connect_and_login()
void MailWidget::on_window_close()
{
- auto response = move(m_imap_client->send_simple_command(IMAP::CommandType::Logout)->await().release_value().get<IMAP::SolidResponse>());
+ auto response = move(MUST(m_imap_client->send_simple_command(IMAP::CommandType::Logout)->await()).release_value().get<IMAP::SolidResponse>());
VERIFY(response.status() == IMAP::ResponseStatus::OK);
m_imap_client->close();
@@ -253,7 +253,7 @@ void MailWidget::selected_mailbox()
if (mailbox.flags & (unsigned)IMAP::MailboxFlag::NoSelect)
return;
- auto response = m_imap_client->select(mailbox.name)->await().release_value();
+ auto response = MUST(m_imap_client->select(mailbox.name)->await()).release_value();
if (response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to select mailbox. The server says: '{}'", response.response_text());
@@ -280,7 +280,7 @@ void MailWidget::selected_mailbox()
},
};
- auto fetch_response = m_imap_client->fetch(fetch_command, false)->await().release_value();
+ auto fetch_response = MUST(m_imap_client->fetch(fetch_command, false)->await()).release_value();
if (response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to retrieve subject/from for e-mails. The server says: '{}'", response.response_text());
@@ -396,7 +396,7 @@ void MailWidget::selected_email_to_load()
},
};
- auto fetch_response = m_imap_client->fetch(fetch_command, false)->await().release_value();
+ auto fetch_response = MUST(m_imap_client->fetch(fetch_command, false)->await()).release_value();
if (fetch_response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to retrieve the body structure of the selected e-mail. The server says: '{}'", fetch_response.response_text());
@@ -457,7 +457,7 @@ void MailWidget::selected_email_to_load()
},
};
- fetch_response = m_imap_client->fetch(fetch_command, false)->await().release_value();
+ fetch_response = MUST(m_imap_client->fetch(fetch_command, false)->await()).release_value();
if (fetch_response.status() != IMAP::ResponseStatus::OK) {
dbgln("Failed to retrieve the body of the selected e-mail. The server says: '{}'", fetch_response.response_text());