Skip to content

Mute for amount of time #98

@zaniluca

Description

@zaniluca

Summary

We'll change the notification toggle (#52) behavior to allow the silencing of notifications for a certain amount of time like:

  • 1 Hour
  • 8 Hours
  • Until tomorrow
  • Forever

This will be done through an option sheet opened when tapping the new Silence settings row, we'll send to the backend an update to the user document with:

{
  "muteUntil": date
}

Where date will be a datetime object computed on the client side:

  • 1,8 Hour/s:
var today = new Date();
today.setHours(today.getHours() + 8);
  • Until Tomorrow:
const today= new Date()
today .setDate(today.getDate() + 1)
  • Forever: Just set a date way in the future
const today= new Date()
today .setDate(today.getYear() + 99)

Todo / ordered steps

  • TBD

Possible impacts / side effects on existing features

TBD

Additional notes

Action Sheet: https://github.com/expo/react-native-action-sheet

Metadata

Metadata

Assignees

Labels

featureNew featuremultiplatformIssue affects both android and ios

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions