Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

drop unstable timezone key support

This commit is contained in:
Henry Hiles 2026-10-22 21:32:19 -04:00
commit d4ae5ebccf
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -39,8 +39,7 @@ class const Profile({
) )
final String? displayName, final String? displayName,
@JsonKey(readValue: Profile.readTimezone, name: Profile.timezoneKey) @JsonKey(name: Profile.timezoneKey) final String? timezone,
final String? timezone,
@JsonKey(readValue: Profile.readPronouns, name: Profile.pronounsKey) @JsonKey(readValue: Profile.readPronouns, name: Profile.pronounsKey)
final IList<Pronoun> pronouns = const .empty(), final IList<Pronoun> pronouns = const .empty(),
@ -48,7 +47,6 @@ class const Profile({
static const avatarUrlKey = "avatar_url"; static const avatarUrlKey = "avatar_url";
static const displayNameKey = "displayname"; static const displayNameKey = "displayname";
static const timezoneKey = "m.tz"; static const timezoneKey = "m.tz";
static const unstableTimezoneKey = "us.cloke.msc4175.tz";
static const pronounsKey = "m.pronouns"; static const pronounsKey = "m.pronouns";
static const unstablePronounsKey = "io.fsky.nyx.pronouns"; static const unstablePronounsKey = "io.fsky.nyx.pronouns";
@ -69,9 +67,6 @@ class const Profile({
/* until stable, commented out: map[key] ?? */ map[Profile /* until stable, commented out: map[key] ?? */ map[Profile
.unstablePronounsKey]; .unstablePronounsKey];
static Object? readTimezone(Map<dynamic, dynamic> map, String key) =>
map[key] ?? map[Profile.unstableTimezoneKey];
factory Profile.fromJson(Map<String, dynamic> json) => factory Profile.fromJson(Map<String, dynamic> json) =>
_$ProfileFromJson(json); _$ProfileFromJson(json);