summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-26 09:19:42 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-26 09:19:42 +0300
commit870d3317eb6c03d4191837fb3e29e8c03acc7317 (patch)
tree3931f82a55de75043f4bd820120af0a2d1bf704c /src
parent1e09aa52915e36b24405426e1eeb9e85458364e6 (diff)
DocumentWidget: Don't update theme/banner on input prompts
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index c65978c8..4a3ffe51 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1137,6 +1137,9 @@ static void updateBanner_DocumentWidget_(iDocumentWidget *d) {
1137} 1137}
1138 1138
1139static void updateTheme_DocumentWidget_(iDocumentWidget *d) { 1139static void updateTheme_DocumentWidget_(iDocumentWidget *d) {
1140 if (category_GmStatusCode(d->sourceStatus) == categoryInput_GmStatusCode) {
1141 return;
1142 }
1140 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { 1143 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) {
1141 iBlock empty; 1144 iBlock empty;
1142 init_Block(&empty, 0); 1145 init_Block(&empty, 0);
@@ -2062,9 +2065,11 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) {
2062 iGmResponse *resp = lockResponse_GmRequest(d->request); 2065 iGmResponse *resp = lockResponse_GmRequest(d->request);
2063 if (d->state == fetching_RequestState) { 2066 if (d->state == fetching_RequestState) {
2064 d->state = receivedPartialResponse_RequestState; 2067 d->state = receivedPartialResponse_RequestState;
2065 clear_Banner(d->banner);
2066 updateTrust_DocumentWidget_(d, resp); 2068 updateTrust_DocumentWidget_(d, resp);
2067 updateTheme_DocumentWidget_(d); 2069 if (isSuccess_GmStatusCode(statusCode)) {
2070 clear_Banner(d->banner);
2071 updateTheme_DocumentWidget_(d);
2072 }
2068 if (~d->certFlags & trusted_GmCertFlag && 2073 if (~d->certFlags & trusted_GmCertFlag &&
2069 isSuccess_GmStatusCode(statusCode) && 2074 isSuccess_GmStatusCode(statusCode) &&
2070 equalCase_Rangecc(urlScheme_String(d->mod.url), "gemini")) { 2075 equalCase_Rangecc(urlScheme_String(d->mod.url), "gemini")) {