|
|
@@ -53,7 +53,6 @@ export default class PageContainer extends Container {
|
|
|
tocHtml: '',
|
|
|
isLiked: false,
|
|
|
isBookmarked: false,
|
|
|
- isSubscribing: false,
|
|
|
seenUsers: [],
|
|
|
seenUserIds: mainContent.getAttribute('data-page-ids-of-seen-users'),
|
|
|
countOfSeenUsers: mainContent.getAttribute('data-page-count-of-seen-users'),
|
|
|
@@ -121,7 +120,6 @@ export default class PageContainer extends Container {
|
|
|
this.retrieveSeenUsers();
|
|
|
this.retrieveLikeInfo();
|
|
|
this.retrieveBookmarkInfo();
|
|
|
- this.retrieveSubscriptionStatus();
|
|
|
}
|
|
|
|
|
|
this.setTocHtml = this.setTocHtml.bind(this);
|
|
|
@@ -305,17 +303,6 @@ export default class PageContainer extends Container {
|
|
|
return this.retrieveBookmarkInfo();
|
|
|
}
|
|
|
|
|
|
- async retrieveSubscriptionStatus() {
|
|
|
- const res = await this.appContainer.apiv3Get('/page/subscribe', { pageId: this.state.pageId });
|
|
|
- this.setState({ isSubscribing: res.data.subscribing });
|
|
|
- }
|
|
|
-
|
|
|
- async toggleSubscribe() {
|
|
|
- const bool = !this.state.isSubscribing;
|
|
|
- await this.appContainer.apiv3Put('page/subscribe', { pageId: this.state.pageId, status: bool });
|
|
|
- return this.retrieveSubscriptionStatus();
|
|
|
- }
|
|
|
-
|
|
|
async checkAndUpdateImageUrlCached(users) {
|
|
|
const noImageCacheUsers = users.filter((user) => { return user.imageUrlCached == null });
|
|
|
if (noImageCacheUsers.length === 0) {
|