зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1643752 - Sort send tab targets by last used r=markh,vbudhram
Differential Revision: https://phabricator.services.mozilla.com/D134722
This commit is contained in:
Родитель
6e1ba3994e
Коммит
3f6b2b72fc
|
@ -419,7 +419,7 @@ var gSync = {
|
|||
targets.push(d);
|
||||
}
|
||||
}
|
||||
return targets.sort((a, b) => a.name.localeCompare(b.name));
|
||||
return targets.sort((a, b) => b.lastAccessTime - a.lastAccessTime);
|
||||
},
|
||||
|
||||
_definePrefGetters() {
|
||||
|
|
|
@ -10,16 +10,19 @@ const fxaDevices = [
|
|||
id: 1,
|
||||
name: "Foo",
|
||||
availableCommands: { "https://identity.mozilla.com/cmd/open-uri": "baz" },
|
||||
lastAccessTime: Date.now(),
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Bar",
|
||||
availableCommands: { "https://identity.mozilla.com/cmd/open-uri": "boo" },
|
||||
lastAccessTime: Date.now() + 60000, // add 30min
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Baz",
|
||||
clientRecord: "bar",
|
||||
lastAccessTime: Date.now() + 120000, // add 60min
|
||||
}, // Legacy send tab target (no availableCommands).
|
||||
{ id: 4, name: "Homer" }, // Incompatible target.
|
||||
];
|
||||
|
|
|
@ -15,16 +15,19 @@ const fxaDevices = [
|
|||
id: 1,
|
||||
name: "Foo",
|
||||
availableCommands: { "https://identity.mozilla.com/cmd/open-uri": "baz" },
|
||||
lastAccessTime: Date.now(),
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Bar",
|
||||
availableCommands: { "https://identity.mozilla.com/cmd/open-uri": "boo" },
|
||||
lastAccessTime: Date.now() + 60000, // add 30min
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Baz",
|
||||
clientRecord: "bar",
|
||||
lastAccessTime: Date.now() + 120000, // add 60min
|
||||
}, // Legacy send tab target (no availableCommands).
|
||||
{ id: 4, name: "Homer" }, // Incompatible target.
|
||||
];
|
||||
|
|
Загрузка…
Ссылка в новой задаче