Syntax fix
This commit is contained in:
parent
41e5ce21ac
commit
f6d7221e75
@ -14609,8 +14609,6 @@ void ContactsManager::memory_cleanup() {
|
||||
received_channel_participants_.rehash(0);
|
||||
cached_channel_participants_.clear();
|
||||
cached_channel_participants_.rehash(0);
|
||||
found_blocked_users_.clear();
|
||||
found_blocked_users_.rehash(0);
|
||||
load_contacts_queries_.clear();
|
||||
load_imported_contacts_queries_.clear();
|
||||
all_imported_contacts_.clear();
|
||||
|
@ -10322,11 +10322,8 @@ void MessagesManager::delete_all_channel_messages_from_user_on_server(ChannelId
|
||||
int32 MessagesManager::get_unload_dialog_delay() const {
|
||||
constexpr int32 DIALOG_UNLOAD_DELAY = 60; // seconds
|
||||
constexpr int32 DIALOG_UNLOAD_BOT_DELAY = 1800; // seconds
|
||||
auto custom_unload_delay = clamp(G()->shared_config().get_option_integer("dialog_unload_delay", -1), -1, 86400);
|
||||
if (custom_unload_delay != -1) {
|
||||
return custom_unload_delay;
|
||||
}
|
||||
return td_->auth_manager_->is_bot() ? DIALOG_UNLOAD_BOT_DELAY : DIALOG_UNLOAD_DELAY;
|
||||
auto default_value = td_->auth_manager_->is_bot() ? DIALOG_UNLOAD_BOT_DELAY : DIALOG_UNLOAD_DELAY;
|
||||
return static_cast<int32>(G()->shared_config().get_option_integer("chat_unload_delay", default_value));
|
||||
}
|
||||
|
||||
void MessagesManager::unload_dialog(DialogId dialog_id) {
|
||||
@ -13991,7 +13988,7 @@ void MessagesManager::dump_debug_message_op(const Dialog *d, int priority) {
|
||||
}
|
||||
|
||||
bool MessagesManager::is_message_unload_enabled() const {
|
||||
auto has_custom_unload_time = clamp(G()->shared_config().get_option_integer("unload_messages_after_seconds", -1), -1, 86400) != -1;
|
||||
auto has_custom_unload_time = G()->shared_config().get_option_integer("unload_messages_after_seconds", -1) != -1;
|
||||
return G()->parameters().use_message_db || td_->auth_manager_->is_bot() || has_custom_unload_time;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user