mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
feat: don't destroy expiring voice messages
This commit is contained in:
parent
6d39a5f1d2
commit
59c2cbaabc
2 changed files with 7 additions and 4 deletions
|
@ -41,6 +41,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/item_text_options.h"
|
||||
#include "lang/lang_keys.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
bool PeerCallKnown(not_null<PeerData*> peer) {
|
||||
|
@ -811,5 +815,6 @@ void ClearMediaAsExpired(not_null<HistoryItem*> item) {
|
|||
}
|
||||
|
||||
[[nodiscard]] bool IsVoiceOncePlayable(not_null<HistoryItem*> item) {
|
||||
return !item->out() && item->media()->ttlSeconds();
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
return !item->out() && item->media()->ttlSeconds() && !settings->saveDeletedMessages;
|
||||
}
|
||||
|
|
|
@ -1550,9 +1550,7 @@ TextWithEntities TransribedText(not_null<HistoryItem*> item) {
|
|||
}
|
||||
|
||||
bool ItemHasTtl(HistoryItem *item) {
|
||||
return (item && item->media())
|
||||
? (item->media()->ttlSeconds() > 0)
|
||||
: false;
|
||||
return false; // AyuGram: allow downloading files with ttl
|
||||
}
|
||||
|
||||
} // namespace HistoryView
|
||||
|
|
Loading…
Add table
Reference in a new issue