Compare commits

...

2 commits

Author SHA1 Message Date
the-djmaze 700543c573 Changes for #1640 2024-06-24 13:43:02 +02:00
the-djmaze e867000ff7 Idea for #1641 2024-06-24 12:26:48 +02:00
2 changed files with 20 additions and 5 deletions

View file

@ -312,9 +312,17 @@ export const
// https://github.com/the-djmaze/snappymail/issues/1125
tmpl.content.querySelectorAll('form,button').forEach(oElement => replaceWithChildren(oElement));
// https://github.com/the-djmaze/snappymail/issues/1641
let body = tmpl.content.querySelector('.mail-body');
[...tmpl.content.querySelectorAll('.mail-body + .mail-body')]
.forEach(oElement => body.append(...oElement.childNodes));
/*
.forEach(oElement => {
let bq = createElement('blockquote');
bq.append(...oElement.childNodes);
body.replaceWith(bq);
});
*/
[...tmpl.content.querySelectorAll('*')].forEach(oElement => {
const name = oElement.tagName,

View file

@ -123,6 +123,8 @@ trait Status
$value = \is_array($value) ? \reset($value) : $value;
if (\is_string($value)) {
$this->MAILBOXID = \base64_encode($value);
} else {
\error_log("{$this->FullName} invalid MAILBOXID value");
}
} else {
$this->$name = (int) $value;
@ -162,12 +164,17 @@ trait Status
&& isset($oResponse->ResponseList[3])
&& \is_array($oResponse->ResponseList[3])
) {
$c = \count($oResponse->ResponseList[3]);
$c = \count($oResponse->ResponseList[3]) - 1;
for ($i = 0; $i < $c; $i += 2) {
$bResult |= $this->setStatusItem(
$oResponse->ResponseList[3][$i],
$oResponse->ResponseList[3][$i+1]
);
if ($c > $i) {
$bResult |= $this->setStatusItem(
$oResponse->ResponseList[3][$i],
$oResponse->ResponseList[3][$i+1]
);
} else {
// https://github.com/the-djmaze/snappymail/issues/1640
\error_log("{$this->FullName} STATUS missing value for {$oResponse->ResponseList[3][$i]}");
}
}
$this->hasStatus = $bResult;
}