Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Couple updates to synced tab ordering (SYNC-3018)
Browse files Browse the repository at this point in the history
- Order tabs inside a device by their last used timestamp
- Order devices by the the last used tab for that device
  • Loading branch information
bendk authored and mergify[bot] committed Feb 8, 2022
1 parent 381416b commit 95765b5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ class SyncedTabsStorage(
.mapNotNull { (client, tabs) ->
val fxaDevice = otherDevices.find { it.id == client.id }

fxaDevice?.let { SyncedDeviceTabs(fxaDevice, tabs) }
fxaDevice?.let { SyncedDeviceTabs(fxaDevice, tabs.sortedByDescending { it.lastUsed }) }
}
.sortedByDescending {
it.tabs.getOrNull(0)?.lastUsed
}
}

Expand Down

0 comments on commit 95765b5

Please sign in to comment.