about summary refs log tree commit diff
path: root/src/state/models/profile-view.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r--src/state/models/profile-view.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index 927374cc6..83389c82d 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -43,6 +43,10 @@ export class ProfileViewModel {
   postsCount: number = 0
   myState = new ProfileViewMyStateModel()
 
+  // TODO TEMP data to be implemented in the protocol
+  userAvatar: string | null = null
+  userBanner: string | null = null
+
   // added data
   descriptionEntities?: Entity[]
 
@@ -115,7 +119,15 @@ export class ProfileViewModel {
     }
   }
 
-  async updateProfile(fn: (existing?: Profile.Record) => Profile.Record) {
+  async updateProfile(
+    fn: (existing?: Profile.Record) => Profile.Record,
+    userAvatar: string | null, // TODO TEMP
+    userBanner: string | null, // TODO TEMP
+  ) {
+    // TODO TEMP add userBanner & userAvatar in the protocol when suported
+    this.userAvatar = userAvatar
+    this.userBanner = userBanner
+
     await apilib.updateProfile(this.rootStore, this.did, fn)
     await this.refresh()
   }