зеркало из https://github.com/mozilla/fxa.git
Merge pull request #16380 from mozilla/fxa-8231
fix(settings): show the most recent access time for a service
This commit is contained in:
Коммит
9361fda4f8
|
@ -124,6 +124,11 @@ describe('Connected Services', () => {
|
||||||
sortedAndUniqueClients.filter((item) => item.name === 'Mozilla Monitor')
|
sortedAndUniqueClients.filter((item) => item.name === 'Mozilla Monitor')
|
||||||
.length
|
.length
|
||||||
).toEqual(1);
|
).toEqual(1);
|
||||||
|
expect(
|
||||||
|
sortedAndUniqueClients.filter(
|
||||||
|
(item) => item.name === 'Mozilla Monitor'
|
||||||
|
)[0].lastAccessTime
|
||||||
|
).toEqual(1570736983000);
|
||||||
expect(groupedByName['Mozilla Monitor'].length).toEqual(2);
|
expect(groupedByName['Mozilla Monitor'].length).toEqual(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ export function sortAndFilterConnectedClients(
|
||||||
.map((key) => {
|
.map((key) => {
|
||||||
return groupedByName[key].sort(
|
return groupedByName[key].sort(
|
||||||
(a: AttachedClient, b: AttachedClient) =>
|
(a: AttachedClient, b: AttachedClient) =>
|
||||||
a.lastAccessTime - b.lastAccessTime
|
b.lastAccessTime - a.lastAccessTime
|
||||||
)[0];
|
)[0];
|
||||||
})
|
})
|
||||||
.sort((a, b) => b.lastAccessTime - a.lastAccessTime);
|
.sort((a, b) => b.lastAccessTime - a.lastAccessTime);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче