refactor: replace async RwLock with sync RwLock for stock strings

This commit is contained in:
link2xt
2026-03-25 09:41:11 +01:00
committed by l
parent d1f1633c60
commit 2637c3bea4
29 changed files with 309 additions and 412 deletions

View File

@@ -233,8 +233,7 @@ async fn maybe_warn_on_bad_time(context: &Context, now: i64, known_past_timestam
|| "YY-MM-DD hh:mm:ss".to_string(),
|ts| ts.format("%Y-%m-%d %H:%M:%S").to_string(),
),
)
.await;
);
if let Some(timestamp) = chrono::DateTime::<chrono::Utc>::from_timestamp(now, 0) {
add_device_msg_with_importance(
context,
@@ -261,7 +260,7 @@ async fn maybe_warn_on_bad_time(context: &Context, now: i64, known_past_timestam
#[expect(clippy::arithmetic_side_effects)]
async fn maybe_warn_on_outdated(context: &Context, now: i64, approx_compile_time: i64) {
if now > approx_compile_time + DC_OUTDATED_WARNING_DAYS * 24 * 60 * 60 {
let mut msg = Message::new_text(stock_str::update_reminder_msg_body(context).await);
let mut msg = Message::new_text(stock_str::update_reminder_msg_body(context));
if let Some(timestamp) = chrono::DateTime::<chrono::Utc>::from_timestamp(now, 0) {
add_device_msg(
context,