From 2084c92dfff6d7f2c2eb78cad567b7f0a283700b Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shpuld@gmail.com>
Date: Wed, 16 Aug 2017 16:40:09 +0300
Subject: [PATCH] Force user profile timeline update when the user id changes
 (like when another user has been searched/found).

---
 src/components/user_profile/user_profile.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 5f9d4d08..48a8a073 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -22,6 +22,12 @@ const UserProfile = {
       }
     }
   },
+  watch: {
+    userId () {
+      this.$store.commit('clearTimeline', { timeline: 'user' })
+      this.$store.dispatch('startFetching', ['user', this.userId])
+    }
+  },
   components: {
     UserCardContent,
     Timeline