Details
Details
- Reviewers
varun michal - Commits
- rCOMMfd3843532984: [identity] Reorder device list when updated
Added unit tests for the reordering function. Also tested manually by:
- Register a user (mobile device)
- Log in the user on a "web" device
- Check database (or call GetDeviceListForUser RPC) - last device list entry has the following order (simplified for brevity): ["ios", "web"]
Now for web-only users:
- Register a user (mobile device)
- Call logout to remove the device
- Login with web - a log is displayed: "No valid primary device found..."
- Log in with mobile again. Check database - last device list entry has the following order: ["ios", "web"]. Mobile was added BEFORE web
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
services/identity/src/database/device_list.rs | ||
---|---|---|
1152 ↗ | (On Diff #34841) |
services/identity/src/database/device_list.rs | ||
---|---|---|
1103–1106 ↗ | (On Diff #34841) | I could've used HashSet here because we only use map keys below |
services/identity/src/database/device_list.rs | ||
---|---|---|
780–782 ↗ | (On Diff #35574) | Can we update the comment? |
1060–1080 ↗ | (On Diff #35574) | Possibly another option would be to make two HashSets and compare them |