Updated TD to 1.8.15
This commit is contained in:
commit
7dd3d16d58
16 changed files with 113 additions and 49 deletions
|
|
@ -1768,6 +1768,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_restricted_send_inline" = "The admins of this group restricted you from posting inline content here.";
|
"lng_restricted_send_inline" = "The admins of this group restricted you from posting inline content here.";
|
||||||
"lng_restricted_send_polls" = "The admins of this group restricted you from posting polls here.";
|
"lng_restricted_send_polls" = "The admins of this group restricted you from posting polls here.";
|
||||||
|
|
||||||
|
"lng_restricted_send_message_until" = "The admins of this group restricted you from writing here until {date}, {time}.";
|
||||||
|
"lng_restricted_send_media_until" = "The admins of this group restricted you from posting media content here until {date}, {time}.";
|
||||||
|
"lng_restricted_send_stickers_until" = "The admins of this group restricted you from posting stickers here until {date}, {time}.";
|
||||||
|
"lng_restricted_send_gifs_until" = "The admins of this group restricted you from posting GIFs here until {date}, {time}.";
|
||||||
|
"lng_restricted_send_inline_until" = "The admins of this group restricted you from posting inline content here until {date}, {time}.";
|
||||||
|
"lng_restricted_send_polls_until" = "The admins of this group restricted you from posting polls here until {date}, {time}.";
|
||||||
|
|
||||||
"lng_restricted_send_message_all" = "Writing messages isn't allowed in this group.";
|
"lng_restricted_send_message_all" = "Writing messages isn't allowed in this group.";
|
||||||
"lng_restricted_send_media_all" = "Posting media content isn't allowed in this group.";
|
"lng_restricted_send_media_all" = "Posting media content isn't allowed in this group.";
|
||||||
"lng_restricted_send_stickers_all" = "Posting stickers isn't allowed in this group.";
|
"lng_restricted_send_stickers_all" = "Posting stickers isn't allowed in this group.";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||||
ProcessorArchitecture="ARCHITECTURE"
|
ProcessorArchitecture="ARCHITECTURE"
|
||||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||||
Version="1.8.13.0" />
|
Version="1.8.15.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Telegram Desktop</DisplayName>
|
<DisplayName>Telegram Desktop</DisplayName>
|
||||||
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>
|
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ void AppendFoundEmoji(
|
||||||
const std::vector<LangPackEmoji> &list) {
|
const std::vector<LangPackEmoji> &list) {
|
||||||
// It is important that the 'result' won't relocate while inserting.
|
// It is important that the 'result' won't relocate while inserting.
|
||||||
result.reserve(result.size() + list.size());
|
result.reserve(result.size() + list.size());
|
||||||
const auto alreadyBegin = result.data();
|
const auto alreadyBegin = begin(result);
|
||||||
const auto alreadyEnd = alreadyBegin + result.size();
|
const auto alreadyEnd = alreadyBegin + result.size();
|
||||||
|
|
||||||
auto &&add = ranges::view::all(
|
auto &&add = ranges::view::all(
|
||||||
|
|
@ -204,6 +204,12 @@ void AppendLegacySuggestions(
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto suggestions = GetSuggestions(QStringToUTF16(query));
|
const auto suggestions = GetSuggestions(QStringToUTF16(query));
|
||||||
|
|
||||||
|
// It is important that the 'result' won't relocate while inserting.
|
||||||
|
result.reserve(result.size() + suggestions.size());
|
||||||
|
const auto alreadyBegin = begin(result);
|
||||||
|
const auto alreadyEnd = alreadyBegin + result.size();
|
||||||
|
|
||||||
auto &&add = ranges::view::all(
|
auto &&add = ranges::view::all(
|
||||||
suggestions
|
suggestions
|
||||||
) | ranges::view::transform([](const Suggestion &suggestion) {
|
) | ranges::view::transform([](const Suggestion &suggestion) {
|
||||||
|
|
@ -214,10 +220,14 @@ void AppendLegacySuggestions(
|
||||||
};
|
};
|
||||||
}) | ranges::view::filter([&](const Result &entry) {
|
}) | ranges::view::filter([&](const Result &entry) {
|
||||||
const auto i = entry.emoji
|
const auto i = entry.emoji
|
||||||
? ranges::find(result, entry.emoji, &Result::emoji)
|
? ranges::find(
|
||||||
: end(result);
|
alreadyBegin,
|
||||||
|
alreadyEnd,
|
||||||
|
entry.emoji,
|
||||||
|
&Result::emoji)
|
||||||
|
: alreadyEnd;
|
||||||
return (entry.emoji != nullptr)
|
return (entry.emoji != nullptr)
|
||||||
&& (i == end(result));
|
&& (i == alreadyEnd);
|
||||||
});
|
});
|
||||||
result.insert(end(result), add.begin(), add.end());
|
result.insert(end(result), add.begin(), add.end());
|
||||||
}
|
}
|
||||||
|
|
@ -593,21 +603,24 @@ std::vector<Result> EmojiKeywords::query(
|
||||||
}
|
}
|
||||||
auto result = std::vector<Result>();
|
auto result = std::vector<Result>();
|
||||||
for (const auto &[language, item] : _data) {
|
for (const auto &[language, item] : _data) {
|
||||||
const auto oldcount = result.size();
|
|
||||||
const auto list = item->query(normalized, exact);
|
const auto list = item->query(normalized, exact);
|
||||||
|
|
||||||
|
// It is important that the 'result' won't relocate while inserting.
|
||||||
|
result.reserve(result.size() + list.size());
|
||||||
|
const auto alreadyBegin = begin(result);
|
||||||
|
const auto alreadyEnd = alreadyBegin + result.size();
|
||||||
|
|
||||||
auto &&add = ranges::view::all(
|
auto &&add = ranges::view::all(
|
||||||
list
|
list
|
||||||
) | ranges::view::filter([&](Result entry) {
|
) | ranges::view::filter([&](Result entry) {
|
||||||
// In each item->query() result the list has no duplicates.
|
// In each item->query() result the list has no duplicates.
|
||||||
// So we need to check only for duplicates between queries.
|
// So we need to check only for duplicates between queries.
|
||||||
const auto oldbegin = begin(result);
|
|
||||||
const auto oldend = oldbegin + oldcount;
|
|
||||||
const auto i = ranges::find(
|
const auto i = ranges::find(
|
||||||
oldbegin,
|
alreadyBegin,
|
||||||
oldend,
|
alreadyEnd,
|
||||||
entry.emoji,
|
entry.emoji,
|
||||||
&Result::emoji);
|
&Result::emoji);
|
||||||
return (i == oldend);
|
return (i == alreadyEnd);
|
||||||
});
|
});
|
||||||
result.insert(end(result), add.begin(), add.end());
|
result.insert(end(result), add.begin(), add.end());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
||||||
#endif // TDESKTOP_OFFICIAL_TARGET
|
#endif // TDESKTOP_OFFICIAL_TARGET
|
||||||
|
|
||||||
constexpr auto AppVersion = 1008013;
|
constexpr auto AppVersion = 1008015;
|
||||||
constexpr auto AppVersionStr = "1.8.13";
|
constexpr auto AppVersionStr = "1.8.15";
|
||||||
constexpr auto AppBetaVersion = true;
|
constexpr auto AppBetaVersion = true;
|
||||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||||
constexpr auto AppKotatoVersion = 1000007;
|
constexpr auto AppKotatoVersion = 1000007;
|
||||||
|
|
|
||||||
|
|
@ -757,6 +757,38 @@ std::optional<QString> RestrictionError(
|
||||||
using Flag = ChatRestriction;
|
using Flag = ChatRestriction;
|
||||||
if (const auto restricted = peer->amRestricted(restriction)) {
|
if (const auto restricted = peer->amRestricted(restriction)) {
|
||||||
const auto all = restricted.isWithEveryone();
|
const auto all = restricted.isWithEveryone();
|
||||||
|
const auto channel = peer->asChannel();
|
||||||
|
if (!all && channel) {
|
||||||
|
auto restrictedUntil = channel->restrictedUntil();
|
||||||
|
if (restrictedUntil > 0 && !ChannelData::IsRestrictedForever(restrictedUntil)) {
|
||||||
|
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
|
||||||
|
auto date = restrictedUntilDateTime.toString(qsl("dd.MM.yy"));
|
||||||
|
auto time = restrictedUntilDateTime.toString(cTimeFormat());
|
||||||
|
|
||||||
|
switch (restriction) {
|
||||||
|
case Flag::f_send_polls:
|
||||||
|
return tr::lng_restricted_send_polls_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
case Flag::f_send_messages:
|
||||||
|
return tr::lng_restricted_send_message_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
case Flag::f_send_media:
|
||||||
|
return tr::lng_restricted_send_media_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
case Flag::f_send_stickers:
|
||||||
|
return tr::lng_restricted_send_stickers_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
case Flag::f_send_gifs:
|
||||||
|
return tr::lng_restricted_send_gifs_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
case Flag::f_send_inline:
|
||||||
|
case Flag::f_send_games:
|
||||||
|
return tr::lng_restricted_send_inline_until(
|
||||||
|
tr::now, lt_date, date, lt_time, time);
|
||||||
|
}
|
||||||
|
Unexpected("Restriction in Data::RestrictionErrorKey.");
|
||||||
|
}
|
||||||
|
}
|
||||||
switch (restriction) {
|
switch (restriction) {
|
||||||
case Flag::f_send_polls:
|
case Flag::f_send_polls:
|
||||||
return all
|
return all
|
||||||
|
|
|
||||||
|
|
@ -3227,7 +3227,7 @@ void HistoryWidget::chooseAttach() {
|
||||||
} else if (const auto error = Data::RestrictionError(
|
} else if (const auto error = Data::RestrictionError(
|
||||||
_peer,
|
_peer,
|
||||||
ChatRestriction::f_send_media)) {
|
ChatRestriction::f_send_media)) {
|
||||||
Ui::Toast::Show(*error);
|
ShowErrorToast(*error);
|
||||||
return;
|
return;
|
||||||
} else if (showSlowmodeError()) {
|
} else if (showSlowmodeError()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ void ScheduledWidget::chooseAttach() {
|
||||||
if (const auto error = Data::RestrictionError(
|
if (const auto error = Data::RestrictionError(
|
||||||
_history->peer,
|
_history->peer,
|
||||||
ChatRestriction::f_send_media)) {
|
ChatRestriction::f_send_media)) {
|
||||||
Ui::Toast::Show(*error);
|
ShowErrorToast(*error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -625,7 +625,7 @@ void Photo::prepareThumbnail(QSize size, QSize frame) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
Video::Video(not_null<Context*> context, Result *result) : FileBase(context, result)
|
Video::Video(not_null<Context*> context, Result *result) : FileBase(context, result)
|
||||||
, _link(getResultContentUrlHandler())
|
, _link(getResultPreviewHandler())
|
||||||
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip)
|
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip)
|
||||||
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
|
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
|
||||||
if (int duration = content_duration()) {
|
if (int duration = content_duration()) {
|
||||||
|
|
@ -1057,7 +1057,7 @@ void Contact::prepareThumbnail(int width, int height) const {
|
||||||
|
|
||||||
Article::Article(not_null<Context*> context, Result *result, bool withThumb) : ItemBase(context, result)
|
Article::Article(not_null<Context*> context, Result *result, bool withThumb) : ItemBase(context, result)
|
||||||
, _url(getResultUrlHandler())
|
, _url(getResultUrlHandler())
|
||||||
, _link(getResultContentUrlHandler())
|
, _link(getResultPreviewHandler())
|
||||||
, _withThumb(withThumb)
|
, _withThumb(withThumb)
|
||||||
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip)
|
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip)
|
||||||
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
|
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
|
||||||
|
|
|
||||||
|
|
@ -187,11 +187,16 @@ ClickHandlerPtr ItemBase::getResultUrlHandler() const {
|
||||||
return ClickHandlerPtr();
|
return ClickHandlerPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
ClickHandlerPtr ItemBase::getResultContentUrlHandler() const {
|
ClickHandlerPtr ItemBase::getResultPreviewHandler() const {
|
||||||
if (!_result->_content_url.isEmpty()) {
|
if (!_result->_content_url.isEmpty()) {
|
||||||
return std::make_shared<UrlClickHandler>(
|
return std::make_shared<UrlClickHandler>(
|
||||||
_result->_content_url,
|
_result->_content_url,
|
||||||
false);
|
false);
|
||||||
|
} else if (_result->_document && _result->_document->canBePlayed()) {
|
||||||
|
return std::make_shared<DocumentOpenClickHandler>(
|
||||||
|
_result->_document);
|
||||||
|
} else if (_result->_photo) {
|
||||||
|
return std::make_shared<PhotoOpenClickHandler>(_result->_photo);
|
||||||
}
|
}
|
||||||
return ClickHandlerPtr();
|
return ClickHandlerPtr();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ protected:
|
||||||
int getResultDuration() const;
|
int getResultDuration() const;
|
||||||
QString getResultUrl() const;
|
QString getResultUrl() const;
|
||||||
ClickHandlerPtr getResultUrlHandler() const;
|
ClickHandlerPtr getResultUrlHandler() const;
|
||||||
ClickHandlerPtr getResultContentUrlHandler() const;
|
ClickHandlerPtr getResultPreviewHandler() const;
|
||||||
QString getResultThumbLetter() const;
|
QString getResultThumbLetter() const;
|
||||||
|
|
||||||
not_null<Context*> context() const {
|
not_null<Context*> context() const {
|
||||||
|
|
|
||||||
|
|
@ -272,9 +272,9 @@ bool Result::onChoose(Layout::ItemBase *layout) {
|
||||||
} else if (_document->loading()) {
|
} else if (_document->loading()) {
|
||||||
_document->cancel();
|
_document->cancel();
|
||||||
} else {
|
} else {
|
||||||
_document->save(
|
DocumentSaveClickHandler::Save(
|
||||||
Data::FileOriginSavedGifs(),
|
Data::FileOriginSavedGifs(),
|
||||||
QString());
|
_document);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -809,6 +809,7 @@ void MainWidget::hiderLayer(base::unique_qptr<Window::HistoryHider> hider) {
|
||||||
_hider->hidden(
|
_hider->hidden(
|
||||||
) | rpl::start_with_next([=, instance = _hider.get()] {
|
) | rpl::start_with_next([=, instance = _hider.get()] {
|
||||||
clearHider(instance);
|
clearHider(instance);
|
||||||
|
instance->hide();
|
||||||
instance->deleteLater();
|
instance->deleteLater();
|
||||||
}, _hider->lifetime());
|
}, _hider->lifetime());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2358,25 +2358,19 @@ void OverlayWidget::playbackPauseResume() {
|
||||||
Expects(_streamed != nullptr);
|
Expects(_streamed != nullptr);
|
||||||
|
|
||||||
_streamed->resumeOnCallEnd = false;
|
_streamed->resumeOnCallEnd = false;
|
||||||
if (const auto item = Auth().data().message(_msgid)) {
|
if (_streamed->player.failed()) {
|
||||||
if (_streamed->player.failed()) {
|
|
||||||
clearStreaming();
|
|
||||||
initStreaming();
|
|
||||||
} else if (_streamed->player.finished()) {
|
|
||||||
_streamingStartPaused = false;
|
|
||||||
restartAtSeekPosition(0);
|
|
||||||
} else if (_streamed->player.paused()) {
|
|
||||||
_streamed->player.resume();
|
|
||||||
updatePlaybackState();
|
|
||||||
playbackPauseMusic();
|
|
||||||
} else {
|
|
||||||
_streamed->player.pause();
|
|
||||||
updatePlaybackState();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
clearStreaming();
|
clearStreaming();
|
||||||
updateControls();
|
initStreaming();
|
||||||
update();
|
} else if (_streamed->player.finished()) {
|
||||||
|
_streamingStartPaused = false;
|
||||||
|
restartAtSeekPosition(0);
|
||||||
|
} else if (_streamed->player.paused()) {
|
||||||
|
_streamed->player.resume();
|
||||||
|
updatePlaybackState();
|
||||||
|
playbackPauseMusic();
|
||||||
|
} else {
|
||||||
|
_streamed->player.pause();
|
||||||
|
updatePlaybackState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3324,7 +3318,7 @@ void OverlayWidget::mousePressEvent(QMouseEvent *e) {
|
||||||
void OverlayWidget::mouseDoubleClickEvent(QMouseEvent *e) {
|
void OverlayWidget::mouseDoubleClickEvent(QMouseEvent *e) {
|
||||||
updateOver(e->pos());
|
updateOver(e->pos());
|
||||||
|
|
||||||
if (_over == OverVideo) {
|
if (_over == OverVideo && _streamed) {
|
||||||
playbackToggleFullScreen();
|
playbackToggleFullScreen();
|
||||||
playbackPauseResume();
|
playbackPauseResume();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -118,14 +118,18 @@ bool ComputeCheckTilde(const style::TextStyle &st) {
|
||||||
|
|
||||||
bool chIsBad(QChar ch) {
|
bool chIsBad(QChar ch) {
|
||||||
return (ch == 0)
|
return (ch == 0)
|
||||||
|| (ch >= 8232 && ch < 8237)
|
|| (ch >= 8232 && ch < 8237)
|
||||||
|| (ch >= 65024 && ch < 65040 && ch != 65039)
|
|| (ch >= 65024 && ch < 65040 && ch != 65039)
|
||||||
|| (ch >= 127 && ch < 160 && ch != 156)
|
|| (ch >= 127 && ch < 160 && ch != 156)
|
||||||
|
|
||||||
// qt harfbuzz crash see https://github.com/telegramdesktop/tdesktop/issues/4551
|
// qt harfbuzz crash see https://github.com/telegramdesktop/tdesktop/issues/4551
|
||||||
|| (Platform::IsMac() && ch == 6158)
|
|| (Platform::IsMac() && ch == 6158)
|
||||||
|
|
||||||
// tmp hack see https://bugreports.qt.io/browse/QTBUG-48910
|
|| (Platform::IsMac()
|
||||||
|
&& !Platform::IsMac10_7OrGreater()
|
||||||
|
&& (ch == 8207 || ch == 8206 || ch == 8288))
|
||||||
|
|
||||||
|
// tmp hack see https://bugreports.qt.io/browse/QTBUG-48910
|
||||||
|| (Platform::IsMac10_11OrGreater()
|
|| (Platform::IsMac10_11OrGreater()
|
||||||
&& !Platform::IsMac10_12OrGreater()
|
&& !Platform::IsMac10_12OrGreater()
|
||||||
&& ch >= 0x0B00
|
&& ch >= 0x0B00
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
AppVersion 1008013
|
AppVersion 1008015
|
||||||
AppVersionStrMajor 1.8
|
AppVersionStrMajor 1.8
|
||||||
AppVersionStrSmall 1.8.13
|
AppVersionStrSmall 1.8.15
|
||||||
AppVersionStr 1.8.13
|
AppVersionStr 1.8.15
|
||||||
BetaChannel 0
|
BetaChannel 0
|
||||||
AlphaVersion 0
|
AlphaVersion 0
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
1.8.15 (07.10.19)
|
||||||
|
|
||||||
|
- Bug fixes and other minor improvements.
|
||||||
|
|
||||||
|
1.8.14 (03.10.19)
|
||||||
|
|
||||||
|
- Bug fixes and other minor improvements.
|
||||||
|
|
||||||
1.8.13 (03.10.19)
|
1.8.13 (03.10.19)
|
||||||
|
|
||||||
- Bug fixes and other minor improvements.
|
- Bug fixes and other minor improvements.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue