Skip to content

Commit 3682449

Browse files
committed
Revert "test code"
This reverts commit 4f15b6f.
1 parent 74ef167 commit 3682449

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/features/quick_tags/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ const processPosts = postElements => filterPostElements(postElements).forEach(as
207207
const tags = editedTagsMap.get(getTimelineItemWrapper(postElement));
208208
tags && addFakeTagsToFooter(postElement, tags);
209209

210-
const { state } = await timelineObject(postElement);
211-
if (['ask', 'submission'].includes(state) === false) {
210+
const { state, canEdit } = await timelineObject(postElement);
211+
if (canEdit && ['ask', 'submission'].includes(state) === false) {
212212
const clonedControlButton = cloneControlButton(controlButtonTemplate, { click: togglePopupDisplay });
213213
insertControlButton(postElement, clonedControlButton, buttonClass);
214214
}

src/features/trim_reblogs/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ const onButtonClicked = async function ({ currentTarget: controlButton }) {
156156
};
157157

158158
const processPosts = postElements => filterPostElements(postElements).forEach(async postElement => {
159-
const { state, trail = [], content = [] } = await timelineObject(postElement);
159+
const { state, canEdit, trail = [], content = [] } = await timelineObject(postElement);
160160
const items = trail.length + (content.length ? 1 : 0);
161161

162-
if (['ask', 'submission'].includes(state) === false) {
162+
if (canEdit && ['ask', 'submission'].includes(state) === false) {
163163
const clonedControlButton = cloneControlButton(controlButtonTemplate, { click: event => onButtonClicked(event).catch(showErrorModal) }, items < 2);
164164
insertControlButton(postElement, clonedControlButton, buttonClass);
165165
}

0 commit comments

Comments
 (0)