Don't show saved messages in top peers
Don't show '0 seconds' in call duration
This commit is contained in:
parent
883d776f6e
commit
2adb7e3528
@ -826,6 +826,11 @@ export default class AppSearchSuper {
|
|||||||
appUsersManager.getTopPeers().then(peers => {
|
appUsersManager.getTopPeers().then(peers => {
|
||||||
if(!middleware()) return;
|
if(!middleware()) return;
|
||||||
|
|
||||||
|
const idx = peers.indexOf(rootScope.myId);
|
||||||
|
if(idx !== -1) {
|
||||||
|
peers = peers.slice();
|
||||||
|
peers.splice(idx, 1);
|
||||||
|
}
|
||||||
//console.log('got top categories:', categories);
|
//console.log('got top categories:', categories);
|
||||||
if(peers.length) {
|
if(peers.length) {
|
||||||
peers.forEach((peerId) => {
|
peers.forEach((peerId) => {
|
||||||
|
@ -34,5 +34,12 @@ export default function formatDuration(duration: number, showLast = 2) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return d.slice(-showLast).reverse();
|
const out = d.slice(-showLast).reverse();
|
||||||
|
for(let i = out.length - 1; i >= 0; --i) {
|
||||||
|
if(out[i].duration === 0) {
|
||||||
|
out.splice(i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user