mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
show hint how to restore saved-messages
the saved-messages can be deleted as any other chat; if the feature is unneeded, this probably also makes some sense. however, if saved-messages was deleted accidentally (yeah, i've seen that :), it is not intuitive to see how the saved-messages feature can be restored. this change just drops a note about how-to-restore to the device chat.
This commit is contained in:
@@ -4988,6 +4988,7 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
#define DC_STR_PROTECTION_ENABLED 88
|
#define DC_STR_PROTECTION_ENABLED 88
|
||||||
#define DC_STR_PROTECTION_DISABLED 89
|
#define DC_STR_PROTECTION_DISABLED 89
|
||||||
#define DC_STR_REPLY_NOUN 90 /* eg. "Reply", used in summaries, a noun, not a verb (not: "to reply") */
|
#define DC_STR_REPLY_NOUN 90 /* eg. "Reply", used in summaries, a noun, not a verb (not: "to reply") */
|
||||||
|
#define DC_STR_SELF_DELETED_MSG_BODY 91
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @}
|
* @}
|
||||||
|
|||||||
13
src/chat.rs
13
src/chat.rs
@@ -337,7 +337,7 @@ impl ChatId {
|
|||||||
);
|
);
|
||||||
/* Up to 2017-11-02 deleting a group also implied leaving it, see above why we have changed this. */
|
/* Up to 2017-11-02 deleting a group also implied leaving it, see above why we have changed this. */
|
||||||
|
|
||||||
let _chat = Chat::load_from_db(context, self).await?;
|
let chat = Chat::load_from_db(context, self).await?;
|
||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute(
|
.execute(
|
||||||
@@ -373,6 +373,17 @@ impl ChatId {
|
|||||||
let j = job::Job::new(Action::Housekeeping, 0, Params::new(), 10);
|
let j = job::Job::new(Action::Housekeeping, 0, Params::new(), 10);
|
||||||
job::add(context, j).await;
|
job::add(context, j).await;
|
||||||
|
|
||||||
|
if chat.is_self_talk() {
|
||||||
|
let mut msg = Message::new(Viewtype::Text);
|
||||||
|
msg.text = Some(
|
||||||
|
context
|
||||||
|
.stock_str(StockMessage::SelfDeletedMsgBody)
|
||||||
|
.await
|
||||||
|
.into(),
|
||||||
|
);
|
||||||
|
add_device_msg(&context, None, Some(&mut msg)).await?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -244,6 +244,10 @@ pub enum StockMessage {
|
|||||||
// used in summaries, a noun, not a verb (not: "to reply")
|
// used in summaries, a noun, not a verb (not: "to reply")
|
||||||
#[strum(props(fallback = "Reply"))]
|
#[strum(props(fallback = "Reply"))]
|
||||||
ReplyNoun = 90,
|
ReplyNoun = 90,
|
||||||
|
|
||||||
|
#[strum(props(fallback = "You deleted the \"Saved messages\" chat.\n\n\
|
||||||
|
To use the \"Saved messages\" feature again, create a new chat with yourself."))]
|
||||||
|
SelfDeletedMsgBody = 91,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user