Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side thread mutes #4518

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Server-side thread mutes #4518

merged 5 commits into from
Jun 18, 2024

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Jun 14, 2024

Thread mutes are now applied server-side and stop notifications from being sent out altogether.

Client implementation-wise, I added a new cache of Record<string, boolean> for optimistically setting muted threads. The "mute thread" button first looks there, and if no value is present looks at the record viewer state (this is because all posts in a thread share the same value, so I wasn't able to use the post shadow system). Mutations are queued, like likes are.

Note: muted thread will no longer retroactively remove old notifications from the notification list

Copy link

render bot commented Jun 14, 2024

Copy link

github-actions bot commented Jun 14, 2024

Old size New size Diff
6.41 MB 6.41 MB -483 B (-0.01%)

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code overall makes sense to me. have not QA'd.

i think the part about where the provider is placed is important, but lmk if not and i missed something

@mozzius mozzius force-pushed the samuel/mute-thread branch from 939fc64 to c6103e4 Compare June 18, 2024 14:18
@gaearon gaearon merged commit 5f5d845 into main Jun 18, 2024
6 checks passed
@gaearon gaearon deleted the samuel/mute-thread branch June 18, 2024 18:48
estrattonbailey added a commit that referenced this pull request Jun 18, 2024
* origin/main: (22 commits)
  Disable newskie dialog tap in hover card web (#4562)
  Implement thread locking (#4545)
  Prevent unecessary calls (#4561)
  Force callers of `getTimeAgo` to pass in the value for "now" (#4560)
  Fix: only apply self-thread load-more behavior on the outer edge of the reply tree (#4559)
  Server-side thread mutes (#4518)
  Explore fixes (#4540)
  Is it "newskie" or "newsky" 🤔  (#4557)
  fix keyboard overlaying onboarding inputs (#4558)
  Add `useGetTimeAgo` and utils (#4556)
  Unconditionally polyfill Intl.PluralRules for native (#4554)
  Dedupe Zod installation (#4551)
  Use exact imports for icons (#4549)
  Fix Android startup perf regression (#4544)
  Explore feed cards (#4521)
  Onboarding fixes (#4508)
  Add `native_pwi_disabled` feature gate experiment (#4507)
  Select, don't mutate (#4541)
  Don't show "Pin/Add" button on feed card w/ no session (#4539)
  Add patch for `RCTBaseTextInput` fixing `selectTextOnFocus` prop (#4533)
  ...
estrattonbailey added a commit that referenced this pull request Jun 18, 2024
* origin/main: (35 commits)
  Bump labeler limit to 20 (#4565)
  Migrate local thread mutes (#4523)
  Disable newskie dialog tap in hover card web (#4562)
  Implement thread locking (#4545)
  Prevent unecessary calls (#4561)
  Force callers of `getTimeAgo` to pass in the value for "now" (#4560)
  Fix: only apply self-thread load-more behavior on the outer edge of the reply tree (#4559)
  Server-side thread mutes (#4518)
  Explore fixes (#4540)
  Is it "newskie" or "newsky" 🤔  (#4557)
  fix keyboard overlaying onboarding inputs (#4558)
  Add `useGetTimeAgo` and utils (#4556)
  Unconditionally polyfill Intl.PluralRules for native (#4554)
  Dedupe Zod installation (#4551)
  Use exact imports for icons (#4549)
  Fix Android startup perf regression (#4544)
  Explore feed cards (#4521)
  Onboarding fixes (#4508)
  Add `native_pwi_disabled` feature gate experiment (#4507)
  Select, don't mutate (#4541)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants