list filter attachment sizes in bytes

This commit is contained in:
Andris Reinman 2018-04-11 15:54:33 +03:00
parent 97af5287e4
commit 7beedf01d8

View file

@ -1095,8 +1095,9 @@ function getFilterStrings(filter, mailboxes) {
}
if (filter.query.size) {
let unit = 'B';
// let unit = 'B';
let size = Math.abs(filter.query.size || 0);
/*
if (size) {
if (filter.query.size % (1024 * 1024) === 0) {
unit = 'MB';
@ -1106,10 +1107,11 @@ function getFilterStrings(filter, mailboxes) {
size = Math.round(size / 1024);
}
}
*/
if (filter.query.size > 0) {
query.push(['larger', size + unit]);
query.push(['larger', size /*+ unit*/]);
} else if (filter.query.size < 0) {
query.push(['smaller', size + unit]);
query.push(['smaller', size /*+ unit*/]);
}
}