mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Clock: 12 hour "midnight format" (#341)
* Clock: 12 hour midnight format - References #317 and adds the options `12:XX` and `00:XX` in `Settings > System > Midnight Format` to display the preferred clock format past midnight on all clocks (Desktop, Main Menu MNTM style, Lock screen and Nightstand clock app). "12:30 AM" -> "00:30" OR "12:30". * 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. * clock app external * Moved midnight format setting into new `Interface > General` * Update applications/main/momentum_app/scenes/momentum_app_scene_interface_general.c * Update changelog --------- Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <locale/locale.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include "../desktop_i.h"
|
||||
#include "desktop_view_locked.h"
|
||||
|
||||
#define COVER_MOVING_INTERVAL_MS (50)
|
||||
@@ -79,6 +78,9 @@ void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) {
|
||||
} else {
|
||||
pm = datetime.hour > 12;
|
||||
snprintf(meridian_str, 3, datetime.hour >= 12 ? "PM" : "AM");
|
||||
if(datetime.hour == 0) {
|
||||
datetime.hour = momentum_settings.midnight_format_00 ? 0 : 12;
|
||||
}
|
||||
}
|
||||
snprintf(time_str, 9, "%.2d:%.2d", pm ? datetime.hour - 12 : datetime.hour, datetime.minute);
|
||||
snprintf(second_str, 5, ":%.2d", datetime.second);
|
||||
|
||||
Reference in New Issue
Block a user