1
0
mirror of git://jb55.com/damus synced 2024-09-18 19:23:49 +00:00
damus/damus
Daniel D’Aquino 0f86a41c4a ui: Hide quoted or reposted notes from people whom the user has muted. (#1216)
Summary
-------

This patch fixes the issue where the user might see notes from users that they have muted, if such note has been reposted or quoted.

Furthermore, this patch introduces some improvements on some of the associated views, making them more reusable.

Testing of the fix
------------------

**PASS**

**Device:** iPhone 14 Pro simulator
**iOS:** 17.0
**Damus:** This commit
**Test steps:**

1. Create two test accounts (if not created already). We will use test account "A". Test account "B" is an external test account
2. Make some notes from test account "B" (if non existent)
3. Switch to account "A"
4. Under test account "A", follow account "B"
5. Repost a note from account "B", and quote another note from account "B"
6. Access "account B"'s timeline. Repost and quoted note should all be visible. Layout should look as usual
7. Click on the reposted note. Should appear and it should look normal
8. Click on the note with the quote. Should appear and it should look normal
9. Click on the quoted note. Should appear and it should look normal
10. Now mute account "B"
12. Go back to account "A"'s timeline
13. Repost should appear, but the reposted content should be hidden behind a mute box. Clicking on show/hide should show or hide muted content
14. Note with quoted content should appear, but the quoted content should be hidden behind a mute box. Clicking on show/hide should work as expected
15. Make sure that the layout in steps 13 and 14 look good.
16. Click on the repost to access the thread view. Should be muted as expected.
17. Add a comment to the repost. Comment should appear even if the mute box hides the main note
18. Click on the note with quote to open its thread view. Comments should appear, main note should appear, but quoted content should be behind the mute box
19. Under account "B", add a comment to the quoted notes
20. Under account "A", check in the thread view that "B"'s reply is behind a mute box
21. Reply to the note with the quote. Check that the note appears correctly and that quoted content is behind the mute box (in the post composer view)
22. Find on Nostr a post where one of the replies contains a quoted note. Mute the user of the quoted content, and check that quoted content is now in a mute box

Smoke sanity test
-----------------

**PASS**

**Device:** iPhone 14 pro simulator
**iOS:** 16.4
**Test steps:** Browse a timeline filled with real notes and comments. Go through different notes and threads, mute some users, just to make sure nothing else appears obsviously broken.

Other notes
-----------

I removed this code:

```
.frame(maxWidth: .infinity, minHeight: PFP_SIZE)
```

from `EventShell`, because it was causing the layout to break on "threaded" style event view with muted quoted content (e.g. in a reply with quoted content).

The line of code dates back to `495859e07f`, but I am not sure why this line existed in the first place, or if removing it has any negative impact.

Closes: https://github.com/damus-io/damus/issues/1216
Changelog-Fixed: Hide quoted or reposted notes from people whom the user has muted. (#1216)
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-02 12:34:08 -07:00
..
ar.lproj Update translations 2023-07-09 15:36:35 -04:00
Assets.xcassets colors: add color sets from figma 2023-09-09 09:45:15 -07:00
az.lproj Update translations 2023-07-09 15:36:35 -04:00
bg.lproj Update translations 2023-07-09 15:36:35 -04:00
Components Fix localization issues and export strings for translation 2023-09-24 11:33:51 -07:00
cs.lproj Update translations 2023-07-09 15:36:35 -04:00
de.lproj Update Translations 2023-07-30 11:57:18 -07:00
el-GR.lproj Update Translations 2023-07-30 11:57:18 -07:00
en-US.lproj Fix localization issues and export strings for translation 2023-07-14 09:34:29 -07:00
en-US.xcloc Fix localization issues and export strings for translation 2023-09-24 11:33:51 -07:00
es-419.lproj Update Translations 2023-07-30 11:57:18 -07:00
es-ES.lproj Update translations 2023-07-09 15:36:35 -04:00
et.lproj Apply translations 2023-05-05 09:01:06 -07:00
fa.lproj Update translations 2023-07-09 15:36:35 -04:00
fi.lproj transations: add finnish translation 2023-09-07 10:33:37 -07:00
fr.lproj Update translations 2023-07-09 15:36:35 -04:00
hu-HU.lproj Update Translations 2023-07-30 11:57:18 -07:00
id.lproj Update translations 2023-07-09 15:36:35 -04:00
it-IT.lproj Update translations 2023-07-09 15:36:35 -04:00
ja.lproj Update Translations 2023-07-30 11:57:18 -07:00
ko.lproj Update Translations 2023-07-30 11:57:18 -07:00
lv-LV.lproj Update translations 2023-07-09 15:36:35 -04:00
Models Add translate.nostr.wine to available translation services 2023-10-02 12:34:08 -07:00
Modifiers Add double tap gesture and fix bugs 2023-01-25 16:10:18 -08:00
nl.lproj Update translations 2023-07-19 10:11:42 -07:00
Nostr nostrdb: fix profiles not updating 2023-09-24 17:07:09 -07:00
Notify ndb: switch profile queries to use transactions 2023-09-21 09:10:06 -04:00
pl-PL.lproj Update Translations 2023-07-30 11:57:18 -07:00
Preview Content/Preview Assets.xcassets add preview content 2022-05-21 11:09:44 -07:00
pt-BR.lproj Update translations 2023-07-09 15:36:35 -04:00
pt-PT.lproj Update translations 2023-07-09 15:36:35 -04:00
ru.lproj Update translations 2023-07-09 15:36:35 -04:00
sv-SE.lproj Update Translations 2023-07-30 11:57:18 -07:00
sw.lproj Update translations 2023-07-09 15:36:35 -04:00
tr-TR.lproj Update translations 2023-07-09 15:36:35 -04:00
Types ids: introduce NoteKey 2023-09-21 09:10:06 -04:00
uk.lproj Update translations 2023-07-09 15:36:35 -04:00
Util Add translate.nostr.wine to available translation services 2023-10-02 12:34:08 -07:00
vi.lproj Update translations 2023-07-09 15:36:35 -04:00
Views ui: Hide quoted or reposted notes from people whom the user has muted. (#1216) 2023-10-02 12:34:08 -07:00
zh-CN.lproj Update Translations 2023-07-30 11:57:18 -07:00
zh-HK.lproj Update Translations 2023-07-30 11:57:18 -07:00
zh-TW.lproj Update Translations 2023-07-30 11:57:18 -07:00
ContentParsing.swift Move the Block helper type to its own file, collapse the various standalone functions for parsing block data, and refactor consumers to initialize a Block with given data and access its members as needed. 2023-09-03 18:02:32 -07:00
ContentView.swift search: switch to nostrdb profile searching 2023-09-21 13:19:22 -04:00
damus.entitlements add extended virtual memory entitlement 2023-08-26 20:46:42 -07:00
damusApp.swift videos: improve precision & sensitivity of auto-pause mechanism 2023-08-23 09:24:13 -07:00
Info.plist Live Music & Generic Statuses 2023-08-23 13:26:55 -07:00
TestData.swift search: switch to nostrdb profile searching 2023-09-21 13:19:22 -04:00