Fix: Move midnight format setting out of furi_rtc

- Also felt like the midnight format setting was too out of place in `MNTM > Interface` with the 5 other submenu entries, so I put it in Misc for now.
This commit is contained in:
956MB
2025-01-21 18:54:09 -06:00
parent 9f4a562c22
commit ee3d35267c
13 changed files with 41 additions and 113 deletions
+8 -8
View File
@@ -381,14 +381,14 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
furi_hal_rtc_get_datetime(&curr_dt);
uint8_t hour = curr_dt.hour;
uint8_t min = curr_dt.minute;
if(hour > 12) {
hour -= 12;
}
if(hour == 0) {
hour = (locale_get_midnight_format() == LocaleMidnightFormatTwelve &&
locale_get_time_format() == LocaleTimeFormat12h) ?
12 :
0;
LocaleTimeFormat time_format = locale_get_time_format();
if(time_format == LocaleTimeFormat12h) {
if(hour > 12) {
hour -= 12;
}
if(hour == 0) {
hour = (momentum_settings.midnight_format_00 ? 0 : 12);
}
}
canvas_set_font(canvas, FontSecondary);
char clk[20];