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:
Doug
2026-07-01 16:45:42 +01:00
committed by Doug
parent b8860baf49
commit ace05b97d0
17 changed files with 88 additions and 175 deletions
@@ -120,9 +120,7 @@ protocol ClientProxyProtocol: AnyObject {
var userIDServerName: String? { get }
var userDisplayNamePublisher: CurrentValuePublisher<String?, Never> { get }
var userAvatarURLPublisher: CurrentValuePublisher<URL?, Never> { get }
var userProfilePublisher: CurrentValuePublisher<UserProfile, Never> { get }
/// We delay fetching this until after the first sync. Nil until then
var ignoredUsersPublisher: CurrentValuePublisher<[String]?, Never> { get }
@@ -212,12 +210,10 @@ protocol ClientProxyProtocol: AnyObject {
/// Will only work for rooms that are in our room list/local store
func reportRoomForIdentifier(_ identifier: String, reason: String) async -> Result<Void, ClientProxyError>
@discardableResult func loadUserDisplayName() async -> Result<Void, ClientProxyError>
@discardableResult func loadUserProfile() async -> Result<Void, ClientProxyError>
func setUserDisplayName(_ name: String) async -> Result<Void, ClientProxyError>
@discardableResult func loadUserAvatarURL() async -> Result<Void, ClientProxyError>
func setUserAvatar(media: MediaInfo) async -> Result<Void, ClientProxyError>
func removeUserAvatar() async -> Result<Void, ClientProxyError>