[geary/mjog/info-bar-cleanup: 4/4] Application.Controller: Minor code cleanup for readability
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/info-bar-cleanup: 4/4] Application.Controller: Minor code cleanup for readability
- Date: Tue, 17 Mar 2020 07:21:08 +0000 (UTC)
commit e70153864f0eb2cfd2b9930048634868234c9a63
Author: Michael Gratton <mike vee net>
Date: Tue Mar 17 17:19:54 2020 +1100
Application.Controller: Minor code cleanup for readability
src/client/application/application-controller.vala | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/client/application/application-controller.vala
b/src/client/application/application-controller.vala
index 02d7eaf3..dea82bb7 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -1858,16 +1858,14 @@ internal class Application.AccountContext : Geary.BaseObject {
effective |= ONLINE;
}
if (current.has_service_problem()) {
- // Only retain this flag if the problem isn't auth or
- // cert related, that is handled elsewhere.
- Geary.ClientService.Status incoming =
- account.incoming.current_status;
- Geary.ClientService.Status outgoing =
- account.outgoing.current_status;
- if (incoming != AUTHENTICATION_FAILED &&
- incoming != TLS_VALIDATION_FAILED &&
- outgoing != AUTHENTICATION_FAILED &&
- outgoing != TLS_VALIDATION_FAILED) {
+ // Only retain service problem if the problem isn't auth
+ // or cert related, that is handled elsewhere.
+ const Geary.ClientService.Status SPECIALS[] = {
+ AUTHENTICATION_FAILED,
+ TLS_VALIDATION_FAILED
+ };
+ if (!(account.incoming.current_status in SPECIALS) &&
+ !(account.outgoing.current_status in SPECIALS)) {
effective |= SERVICE_PROBLEM;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]