-
Notifications
You must be signed in to change notification settings - Fork 195
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
Disappearing messages #2660
Disappearing messages #2660
Conversation
f87f116
to
d79fafa
Compare
7c7eacf
to
b91e170
Compare
9f9ff59
to
ee99205
Compare
895da16
to
a1c0930
Compare
ts/session/messages/outgoing/visibleMessage/ClosedGroupVisibleMessage.ts
Outdated
Show resolved
Hide resolved
…reparation for disappearing messages added panel buttons specific to this UI
… and xl margin option
added expirationType and lastDisappearingMessageChangeTimestamp to conversations table, left a few comments for future work
this is more explicit and allows use to use DisappearingMessageType in the message model
added to migration
…ated message pipeline this includes sync messages and updating the protobuf, haven't tested closed groups
updated copy for setting change messages
updated in parts but haven't test what happens
improved setExpirationStartTimestamp logic
this prevents a clash with the userconfig properties to be merged in later
…el if there are no changes
ts/components/conversation/message/message-item/GroupInvitation.tsx
Outdated
Show resolved
Hide resolved
ts/components/conversation/message/message-item/GroupUpdateMessage.tsx
Outdated
Show resolved
Hide resolved
ts/components/conversation/message/message-item/notification-bubble/CallNotification.tsx
Outdated
Show resolved
Hide resolved
ts/components/conversation/right-panel/overlay/disappearing-messages/TimeOptions.tsx
Show resolved
Hide resolved
(convo: ReduxConversationType | undefined) => { | ||
let modes = DisappearingMessageConversationSetting; | ||
// TODO legacy messages support will be removed in a future release | ||
// TODO remove legacy mode | ||
modes = modes.slice(0, -1); | ||
|
||
// Note to Self and Closed Groups only support deleteAfterSend | ||
const isClosedGroup = convo?.isGroup && !convo.isPublic; | ||
if (convo?.isMe || isClosedGroup) { | ||
modes = [modes[0], modes[2]]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could mark DisappearingMessageConversationSetting as const so typescript understands it's not just an array of random string.
I think those lines could maybe be
const modes = convo?.isMe || isClosedGroup ?
[DisappearingMessageConversationSetting[0], DisappearingMessageConversationSetting[2]
: DisappearingMessageConversationSetting.filter("legacy")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep in like that until we remove the legacy support. I saw the next function has the same issues too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool cool. Yeah will be easier to cleanup later
fixed opening correct settings option depending on header option displayed
the previous logic relied on the length of the subtitles array which didn't account for when it changed depending on the conversation we were on
…eReadableMessage this stops us passing props down from the child components of ExpirableReadableMessage
…ting an attachment from disk
…o we have to make deleteData more robust javascript ¯\_(ツ)_/¯
…the default fixed session radio button flickering
converted scss toast styling to styled components
ts/components/conversation/right-panel/overlay/disappearing-messages/DisappearingModes.tsx
Outdated
Show resolved
Hide resolved
ts/components/conversation/right-panel/overlay/disappearing-messages/TimeOptions.tsx
Outdated
Show resolved
Hide resolved
ts/components/conversation/message/message-item/ExpirableReadableMessage.tsx
Show resolved
Hide resolved
ts/components/conversation/header/ConversationHeaderSubtitle.tsx
Outdated
Show resolved
Hide resolved
since we need an id unaffected by localisation
… a string in react
Closed in favour of #2940 |
NOTE: Disappearing messages syncing will be finished after this branch is merged into the user config branch