fixed mail ordering

This commit is contained in:
KF 2019-08-29 01:49:41 -05:00
parent 8549b79ac9
commit dcc42575c3
2 changed files with 3 additions and 4 deletions

View File

@ -51,11 +51,10 @@ class PublicAPISecurity:
resp = httpheaders.set_default_onionr_http_headers(resp)
# Network API version
resp.headers['X-API'] = public_api.API_VERSION
# Delete some HTTP headers for Onionr user agents
if g.is_onionr_client:
del resp.headers['Content-Security-Policy']
del resp.headers['X-Frame-Options']
del resp.headers['X-Content-Type-Options']
print('deleted')
print(resp.headers)
public_api.lastRequest = epoch.get_rounded_epoch(roundS=5)
return resp

View File

@ -269,7 +269,7 @@ function getSentbox(){
if (keys.length == 0){
threadPart.innerHTML = "nothing to show here yet."
}
for (var i = 0; i < keys.length; i++) (function(i, resp){
for (var i = keys.length - 1; i > 0; i--) (function(i, resp){
var entry = document.createElement('div')
var obj = resp[i]
var toLabel = document.createElement('span')
@ -334,7 +334,7 @@ fetch('/mail/getinbox', {
}})
.then((resp) => resp.text()) // Transform the data into json
.then(function(data) {
pms = data.split(',')
pms = data.split(',').reverse()
if (callNext){
getInbox()
}