shuashuai commented on code in PR #1335:
URL: https://github.com/apache/answer/pull/1335#discussion_r2096785703


##########
ui/src/pages/Users/Settings/Profile/index.tsx:
##########
@@ -241,10 +241,7 @@ const Index: React.FC = () => {
 
     modifyUserInfo(params)
       .then(() => {
-        update({
-          ...user,
-          ...params,
-        });
+        getLoggedUserInfo().then(update);

Review Comment:
   > * checkout branch
   > * remove the commit in question
   > * upload a custom avatar
   > * update the custom avatar with another avatar
   > * check the logs and/or the uploads/avatar/ get requests
   
   I tested it and found that this modification still cannot eliminate browser 
cache unless the entire application is reloaded using `window.reload`, however, 
using this method will affect the user's experience.
   
   Because from the perspective of generation implementation, updating user 
information after obtaining from get interface is the same as updating from 
params, and it cannot eliminate browser cache.
   
   Here are the steps I tested with your code:
   1. upload a custom avatar and save
   2. reupload a custom avatar and save
   3. Return to the question list page, and the last avatar will still be 
retrieved from the cache (you can see from the console's get request).
   
   
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@answer.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to