WIP: [Sprint/X](bug): Default hashtags for mature channels
Closes https://gitlab.com/minds/front/issues/915
Mature channels were not automatically being flagged by default as NSFW.
I believe that a newer system has been put in using the user objects nsfw
(arr) attribute; based on this I made an assumption that is_mature
(bool) is the older systems way of handling this, and wrote a condition for it accordingly, marking the post as the last item other
in the list. Without this previously marked channels would not be correctly marked as NSFW - but there was no way to distinguish why their channel is NSFW.
Tested it locally hard-coding
nsfw = [1, 2]
is_mature = null;
and
nsfw = null
is_mature = true;
and both being null.
changed the description
40 40 <ng-container *mIfFeature="'top-feeds'; else oldNSFW"> 41 41 <m-nsfw-selector 42 42 (selected)="onNSWFSelections($event)" 43 [user]="this.minds.user" - Owner
this
should not be used in the context of htmlEdited by Mark Harding
59 70 this.onSelected.next(reasons); 60 71 } 61 72 73 /** 74 * Toggles on all NSFW tags that the logged in user has on them - 75 * if using the old system of is_mature sets the reason to other. 76 */ 77 toggleDefaultNSFW(){ 78 let arr: any[] = (this.user && this.user.nsfw.length !== 0) ? this.user.nsfw 79 : this.user.is_mature ? [this.service.reasons.length - 1] - Owner
hard code to 6
- Owner
We also require server side forcing
added MR::Awaiting Review label
added 345 commits
- ec49e7de...162992f9 - 344 commits from branch
minds:master
- 46818015 - Merge branch 'master' of gitlab.com:minds/front into default-hashtags-for-mature-channels
- ec49e7de...162992f9 - 344 commits from branch
marked as a Work In Progress
unmarked as a Work In Progress
marked as a Work In Progress
closed