Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5efcbfc5 authored by Arnau Mora's avatar Arnau Mora Committed by GitHub
Browse files

Set `Calendars.IS_PRIMARY` to `0` by default (#1945)



* Start setting `IS_PRIMARY`

Signed-off-by: default avatarArnau Mora <arnyminerz@proton.me>

* Set `IS_PRIMARY` to `0`

* Remove unused injection

Signed-off-by: default avatarArnau Mora Gras <arnyminerz@proton.me>

* Improve explanation

Signed-off-by: default avatarArnau Mora Gras <arnyminerz@proton.me>

---------

Signed-off-by: default avatarArnau Mora <arnyminerz@proton.me>
Signed-off-by: default avatarArnau Mora Gras <arnyminerz@proton.me>
parent 4f3ff69b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -122,6 +122,11 @@ class LocalCalendarStore @Inject constructor(
            ).joinToString(",") { it.toString() },
        )

        // By default, set all new calendars as non-primary. Right now we do not support actually fetching the primary calendar.
        // Google Calendar uses this field to determine whether to read the calendar name together with the account name in TalkBack:
        //   if primary, the calendar name is excluded, and as such, all calendars in the account sound the same.
        values.put(Calendars.IS_PRIMARY, 0)

        if (withColor && info.color != null)
            values.put(Calendars.CALENDAR_COLOR, info.color)