Add option to remove DMs from home (#126)

This commit is contained in:
kibigo!
2017-12-06 17:50:27 -08:00
parent 061211a1e3
commit 2f2467ce8e
4 changed files with 11 additions and 0 deletions

View File

@ -32,6 +32,10 @@ const makeGetStatusIds = () => createSelector([
showStatus = showStatus && (statusForId.get('in_reply_to_id') === null || statusForId.get('in_reply_to_account_id') === me);
}
if (columnSettings.getIn(['shows', 'direct']) === false) {
showStatus = showStatus && statusForId.get('visibility') !== 'direct';
}
if (showStatus && regex && statusForId.get('account') !== me) {
const searchIndex = statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'search_index']) : statusForId.get('search_index');
showStatus = !regex.test(searchIndex);