Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,62 @@ data class UserProfileData(
var website: String?,

@JsonField(name = ["websiteScope"], typeConverter = ScopeConverter::class)
var websiteScope: Scope?
var websiteScope: Scope?,

@JsonField(name = ["biography"])
var biography: String?,

@JsonField(name = ["biographyScope"], typeConverter = ScopeConverter::class)
var biographyScope: Scope?,

@JsonField(name = ["fediverse"])
var fediverse: String?,

@JsonField(name = ["fediverseScope"], typeConverter = ScopeConverter::class)
var fediverseScope: Scope?,

@JsonField(name = ["headline"])
var headline: String?,

@JsonField(name = ["headlineScope"], typeConverter = ScopeConverter::class)
var headlineScope: Scope?,

@JsonField(name = ["organisation"])
var organisation: String?,

@JsonField(name = ["organisationScope"], typeConverter = ScopeConverter::class)
var organisationScope: Scope?,

@JsonField(name = ["profile_enabled"])
var profileEnabled: String?,

@JsonField(name = ["profile_enabledScope"], typeConverter = ScopeConverter::class)
var profileEnabledScope: Scope?,

@JsonField(name = ["pronouns"])
var pronouns: String?,

@JsonField(name = ["pronounsScope"], typeConverter = ScopeConverter::class)
var pronounsScope: Scope?,

@JsonField(name = ["role"])
var role: String?,

@JsonField(name = ["roleScope"], typeConverter = ScopeConverter::class)
var roleScope: Scope?,

@JsonField(name = ["bluesky"])
var bluesky: String?,

@JsonField(name = ["blueskyScope"], typeConverter = ScopeConverter::class)
var blueskyScope: Scope?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null, null, null, null, null, null, null, null, null, null, null, null)
constructor() : this(
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null
)

fun getValueByField(field: ProfileActivity.Field?): String? =
when (field) {
Expand All @@ -70,6 +122,14 @@ data class UserProfileData(
ProfileActivity.Field.ADDRESS -> address
ProfileActivity.Field.WEBSITE -> website
ProfileActivity.Field.TWITTER -> twitter
ProfileActivity.Field.BIOGRAPHY -> biography
ProfileActivity.Field.FEDIVERSE -> fediverse
ProfileActivity.Field.HEADLINE -> headline
ProfileActivity.Field.ORGANISATION -> organisation
ProfileActivity.Field.PROFILE_ENABLED -> profileEnabled
ProfileActivity.Field.PRONOUNS -> pronouns
ProfileActivity.Field.ROLE -> role
ProfileActivity.Field.BLUESKY -> bluesky
else -> ""
}

Expand All @@ -81,6 +141,14 @@ data class UserProfileData(
ProfileActivity.Field.ADDRESS -> addressScope
ProfileActivity.Field.WEBSITE -> websiteScope
ProfileActivity.Field.TWITTER -> twitterScope
ProfileActivity.Field.BIOGRAPHY -> biographyScope
ProfileActivity.Field.FEDIVERSE -> fediverseScope
ProfileActivity.Field.HEADLINE -> headlineScope
ProfileActivity.Field.ORGANISATION -> organisationScope
ProfileActivity.Field.PROFILE_ENABLED -> profileEnabledScope
ProfileActivity.Field.PRONOUNS -> pronounsScope
ProfileActivity.Field.ROLE -> roleScope
ProfileActivity.Field.BLUESKY -> blueskyScope
else -> null
}
}
Loading
Loading