Merge branch 'master' of ssh.git.ignuranza.net:tdlight-team/tdlight
This commit is contained in:
commit
d71e2c54a8
|
@ -385,12 +385,15 @@ function onOptionsChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var low_memory = false;
|
var low_memory = false;
|
||||||
if (os_linux || os_freebsd || os_openbsd || os_netbsd) {
|
if (os_linux || os_freebsd || os_netbsd) {
|
||||||
low_memory = document.getElementById('buildLowMemoryCheckbox').checked;
|
low_memory = document.getElementById('buildLowMemoryCheckbox').checked;
|
||||||
document.getElementById('buildLowMemoryText').innerHTML = 'I have less than ' + (use_clang ? '1.5' : '3.5') +' GB of RAM.' +
|
document.getElementById('buildLowMemoryText').innerHTML = 'I have less than ' + (use_clang ? '1.5' : '3.5') +' GB of RAM.' +
|
||||||
(low_memory ? ' Now you will need only ' + (use_clang ? '0.5' : '1') +' GB of RAM to build TDLib.' : '');
|
(low_memory ? ' Now you will need only ' + (use_clang ? '0.5' : '1') +' GB of RAM to build TDLib.' : '');
|
||||||
document.getElementById('buildLowMemoryDiv').style.display = 'block';
|
document.getElementById('buildLowMemoryDiv').style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
|
if (os_openbsd) {
|
||||||
|
low_memory = true;
|
||||||
|
}
|
||||||
document.getElementById('buildLowMemoryDiv').style.display = 'none';
|
document.getElementById('buildLowMemoryDiv').style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,4 +70,10 @@ bool is_service_message_content(MessageContentType content_type);
|
||||||
|
|
||||||
bool can_have_message_content_caption(MessageContentType content_type);
|
bool can_have_message_content_caption(MessageContentType content_type);
|
||||||
|
|
||||||
|
struct MessageContentTypeHash {
|
||||||
|
std::size_t operator()(MessageContentType content_type) const {
|
||||||
|
return std::hash<int32>()(static_cast<int32>(content_type));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
|
|
@ -1922,7 +1922,7 @@ class SearchMessagesQuery : public Td::ResultHandler {
|
||||||
send_query(G()->net_query_creator().create(
|
send_query(G()->net_query_creator().create(
|
||||||
telegram_api::messages_getUnreadMentions(std::move(input_peer), from_message_id.get_server_message_id().get(),
|
telegram_api::messages_getUnreadMentions(std::move(input_peer), from_message_id.get_server_message_id().get(),
|
||||||
offset, limit, std::numeric_limits<int32>::max(), 0)));
|
offset, limit, std::numeric_limits<int32>::max(), 0)));
|
||||||
} else if (top_thread_message_id.is_valid() && !sender_dialog_id.is_valid() &&
|
} else if (top_thread_message_id.is_valid() && query.empty() && !sender_dialog_id.is_valid() &&
|
||||||
filter == MessageSearchFilter::Empty) {
|
filter == MessageSearchFilter::Empty) {
|
||||||
handle_errors_ = dialog_id.get_type() != DialogType::Channel ||
|
handle_errors_ = dialog_id.get_type() != DialogType::Channel ||
|
||||||
td->contacts_manager_->get_channel_type(dialog_id.get_channel_id()) != ChannelType::Broadcast;
|
td->contacts_manager_->get_channel_type(dialog_id.get_channel_id()) != ChannelType::Broadcast;
|
||||||
|
@ -23227,7 +23227,7 @@ Result<vector<MessageId>> MessagesManager::send_message_group(
|
||||||
TRY_RESULT(message_send_options, process_message_send_options(dialog_id, std::move(options)));
|
TRY_RESULT(message_send_options, process_message_send_options(dialog_id, std::move(options)));
|
||||||
|
|
||||||
vector<std::pair<unique_ptr<MessageContent>, int32>> message_contents;
|
vector<std::pair<unique_ptr<MessageContent>, int32>> message_contents;
|
||||||
std::unordered_set<MessageContentType> message_content_types;
|
std::unordered_set<MessageContentType, MessageContentTypeHash> message_content_types;
|
||||||
for (auto &input_message_content : input_message_contents) {
|
for (auto &input_message_content : input_message_contents) {
|
||||||
TRY_RESULT(message_content, process_input_message_content(dialog_id, std::move(input_message_content)));
|
TRY_RESULT(message_content, process_input_message_content(dialog_id, std::move(input_message_content)));
|
||||||
TRY_STATUS(can_use_message_send_options(message_send_options, message_content));
|
TRY_STATUS(can_use_message_send_options(message_send_options, message_content));
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
using namespace td;
|
using namespace td;
|
||||||
|
|
||||||
struct CheckExitGuard {
|
struct CheckExitGuard {
|
||||||
explicit CheckExitGuard(bool expected_value): expected_value_(expected_value) {
|
explicit CheckExitGuard(bool expected_value) : expected_value_(expected_value) {
|
||||||
}
|
}
|
||||||
CheckExitGuard(CheckExitGuard &&) = delete;
|
CheckExitGuard(CheckExitGuard &&) = delete;
|
||||||
CheckExitGuard &operator=(CheckExitGuard &&) = delete;
|
CheckExitGuard &operator=(CheckExitGuard &&) = delete;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user