firefox: fix selection of lastUserContextId

The lastUserContextId value should match the highest context ID from
the containers set in a given profile. This update ensures that this
always is the case.
This commit is contained in:
Nina Morgan 2024-09-08 03:52:15 -04:00 committed by GitHub
parent aaebdea769
commit ec4c6928bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,8 @@ let
${builtins.toJSON {
version = 4;
lastUserContextId =
elemAt (mapAttrsToList (_: container: container.id) containers) 0;
foldlAttrs (acc: _: value: if value.id > acc then value.id else acc) 0
containers;
identities = mapAttrsToList containerToIdentity containers ++ [
{
userContextId = 4294967294; # 2^32 - 2