mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Combine the user's own display name/avatar into a single profile.
This is in preparation for adding the user status fields into the profile.
This commit is contained in:
+3
-7
@@ -16,26 +16,22 @@ enum UserDetailsEditScreenViewModelAction {
|
||||
}
|
||||
|
||||
struct UserDetailsEditScreenViewState: BindableState {
|
||||
let userID: String
|
||||
var currentUserProfile: UserProfile
|
||||
|
||||
var canEditAvatar = true
|
||||
var canEditDisplayName = true
|
||||
|
||||
var currentAvatarURL: URL?
|
||||
var selectedAvatarURL: URL?
|
||||
|
||||
var currentDisplayName: String?
|
||||
|
||||
var localMedia: MediaInfo?
|
||||
|
||||
var bindings: UserDetailsEditScreenViewStateBindings
|
||||
|
||||
var nameDidChange: Bool {
|
||||
bindings.name != currentDisplayName
|
||||
bindings.name != currentUserProfile.displayName
|
||||
}
|
||||
|
||||
var avatarDidChange: Bool {
|
||||
localMedia != nil || selectedAvatarURL != currentAvatarURL
|
||||
localMedia != nil || selectedAvatarURL != currentUserProfile.avatarURL
|
||||
}
|
||||
|
||||
var canSave: Bool {
|
||||
|
||||
Reference in New Issue
Block a user