Remove cached_followed_tag_names From Async User Data (#8148)

This commit is contained in:
Molly Struve 2020-05-29 09:24:26 -05:00 committed by GitHub
parent c3f3575dcf
commit 15d2dd0b3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,6 @@ class AsyncInfoController < ApplicationController
name: @user.name,
username: @user.username,
profile_image_90: ProfileImage.new(@user).get(width: 90),
followed_tag_names: @user.cached_followed_tag_names,
followed_tags: @user.cached_followed_tags.to_json(only: %i[id name bg_color_hex text_color_hex hotness_score], methods: [:points]),
followed_user_ids: @user.cached_following_users_ids,
followed_organization_ids: @user.cached_following_organizations_ids,

View file

@ -4,11 +4,12 @@ import { ReadingList } from '../readingList/readingList';
function loadElement() {
getUserDataAndCsrfToken().then(({ currentUser }) => {
const followedTagNames = JSON.parse(currentUser.followed_tags).map(t => t.name);
const root = document.getElementById('reading-list');
if (root) {
render(
<ReadingList
availableTags={currentUser.followed_tag_names}
availableTags={followedTagNames}
statusView={root.dataset.view}
/>,
root,