-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add setting to enable 24-hour time format #1739
base: dev
Are you sure you want to change the base?
Conversation
Preview: https://1739--pr-cinny.netlify.app |
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.
changes look good. for the simplicity i think we should just call it as hour24Clock
|
||
export type TimeProps = { | ||
compact?: boolean; | ||
ts: number; | ||
}; | ||
|
||
export const Time = as<'span', TimeProps>(({ compact, ts, ...props }, ref) => { | ||
const [hour24Clock] = useSetting(settingsAtom, 'hour24Clock'); |
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.
Subscribing to settingsAtom
inside Time
component can downgrade the perf of our timeline as every Time
component in every message will be listening to it where more perf oriented approach can be to receive hour24Clock
as component param and we can subscribe to settingsAtom
once for all.
@agmm are you still willing to update this PR? |
I totally forgot about this PR, but yes, I am willing to update it. I will take a look as soon as I have the time. |
Description
Support for the 24-hour time format has been a frequently requested feature in the Cinny Matrix room and has been mentioned in multiple issues: #60, #1333, #1549, #1648. This PR adds a toggle in the settings page that allows the user to switch between 12-hour and 24-hour time formats.
Type of change
Checklist: