vitorpamplona / amethyst

Nostr client for Android
MIT License
1.17k stars 158 forks source link

Hide drafts from other accounts on device #1179

Closed davotoula closed 4 days ago

davotoula commented 6 days ago

Bug: #1172

This solution filters out drafts from other accounts on device before displaying a thread (draft content from other accounts was never visible due to encryption).

First commit ffd43e448bc1687cd4847f1589f37091748a4e37 has the actual functionality change the other commits are code cleanup.

Maybe another solution would be to clear drafts when switching accounts but then drafts would always have to be fetched again when switching back. With this solution drafts remain in cache and are just filtered out if they are not your drafts.

Comment count is incorrect as it includes the hidden comments. This issue is already present due to hidden comments by mute and anti spam so maybe it can be fixed all together in another feature.

User one is logged in and sees 2 comments on user Twoo post and three comments on his own post. a1

User one sees three draft comments on his own post a2

User one sees no drafts on user Twoooo post a3