Skip to content

Commit e5d7e5e

Browse files
committed
Revert "test code"
This reverts commit 4f15b6f.
1 parent 4f15b6f commit e5d7e5e

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
@@ -204,8 +204,8 @@ const processPosts = postElements => filterPostElements(postElements).forEach(as
204204
const tags = editedTagsMap.get(getTimelineItemWrapper(postElement));
205205
tags && addFakeTagsToFooter(postElement, tags);
206206

207-
const { state } = await timelineObject(postElement);
208-
if (['ask', 'submission'].includes(state) === false) {
207+
const { state, canEdit } = await timelineObject(postElement);
208+
if (canEdit && ['ask', 'submission'].includes(state) === false) {
209209
const clonedControlButton = cloneControlButton(controlButtonTemplate, { click: togglePopupDisplay });
210210
insertControlButton(postElement, clonedControlButton, buttonClass);
211211
}

src/features/trim_reblogs/index.js

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

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

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

0 commit comments

Comments
 (0)