mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Prevent Circular dependencies
This commit is contained in:
parent
bb4ff4fdc7
commit
c270f0ad9a
10 changed files with 99 additions and 125 deletions
|
|
@ -687,16 +687,25 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
|
||||
// getAutocomplete
|
||||
emailsSource(oData, fResponse) {
|
||||
Remote.suggestions((iError, data) => {
|
||||
if (!iError && isArray(data.Result)) {
|
||||
fResponse(
|
||||
data.Result.map(item => (item && item[0] ? (new EmailModel(item[0], item[1])).toLine(false) : null))
|
||||
.filter(v => v)
|
||||
);
|
||||
} else if (Notification.RequestAborted !== iError) {
|
||||
fResponse([]);
|
||||
}
|
||||
}, oData.term);
|
||||
Remote.request('Suggestions',
|
||||
(iError, data) => {
|
||||
if (!iError && isArray(data.Result)) {
|
||||
fResponse(
|
||||
data.Result.map(item => (item && item[0] ? (new EmailModel(item[0], item[1])).toLine(false) : null))
|
||||
.filter(v => v)
|
||||
);
|
||||
} else if (Notification.RequestAborted !== iError) {
|
||||
fResponse([]);
|
||||
}
|
||||
},
|
||||
{
|
||||
Query: oData.term
|
||||
// ,Page: 1
|
||||
},
|
||||
null,
|
||||
'',
|
||||
['Suggestions']
|
||||
);
|
||||
}
|
||||
|
||||
reloadDraftFolder() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue