drop unstable timezone key support
This commit is contained in:
parent
850bd33b18
commit
d4ae5ebccf
1 changed files with 1 additions and 6 deletions
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue