Merge pull request #1248 from SergeyMosin/some-fixes

Some fixes
This commit is contained in:
the-djmaze 2023-10-01 11:46:05 +02:00 committed by GitHub
commit 7a49d55736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 16 deletions

View file

@ -141,3 +141,10 @@ function SnappyMailFormHelper(oForm)
console.error(e);
}
}
addEventListener('hashchange', (event) => {
const search = event.newURL.substring(event.newURL.lastIndexOf('/') + 1);
if (search && search.length < 25) {
document.getElementById('rliframe').contentWindow.rl.app.messageList.mainSearch(search);
}
});

View file

@ -91,12 +91,12 @@ class Provider implements IProvider
$MessageCollection = $oMailClient->MessageList($oParams);
$baseURL = $this->urlGenerator->linkToRoute('snappymail.page.index');
$config = \OC::$server->getConfig();
if ($config->getAppValue('snappymail', 'snappymail-no-embed')) {
$baseURL .= '?target=';
} else {
// $config = \OC::$server->getConfig();
// if ($config->getAppValue('snappymail', 'snappymail-no-embed')) {
// $baseURL .= '?target=';
// } else {
$baseURL .= '#';
}
// }
$search = \rawurlencode($oParams->sSearch);
// $MessageCollection->totalEmails;