Skip to content

Commit

Permalink
Updated to 4.8.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Jul 29, 2023
2 parents b4920fa + 8ec0bdc commit 7280a37
Show file tree
Hide file tree
Showing 35 changed files with 256 additions and 160 deletions.
Binary file modified Telegram/Resources/day-blue.tdesktop-theme
Binary file not shown.
Binary file modified Telegram/Resources/day-custom-base.tdesktop-theme
Binary file not shown.
3 changes: 2 additions & 1 deletion Telegram/Resources/langs/lang.strings
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channel_usernames_deactivate_description" = "Do you want to hide this link from the channel info page?";
"lng_channel_usernames_description" = "Drag and drop links to change the order in which they will be displayed on the channel info page.";

"lng_bot_username_title" = "Username";
"lng_bot_username_title" = "Public Link";
"lng_bot_username_description1" = "This link cannot be edited. You can acquire additional usernames on {link}.";
"lng_bot_username_description1_link" = "Fragment";
"lng_bot_usernames_activate_description" = "Do you want to show this link on the bot info page?";
Expand Down Expand Up @@ -3627,6 +3627,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_filters_restore" = "Undo";
"lng_filters_new" = "New Folder";
"lng_filters_edit" = "Edit Folder";
"lng_filters_setup_menu" = "Edit Folders";
"lng_filters_new_name" = "Folder name";
"lng_filters_add_chats" = "Add chats";
"lng_filters_remove_chats" = "Remove chats";
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Resources/uwp/AppX/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="4.8.9.0" />
Version="4.8.10.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Telegram.rc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,8,9,0
PRODUCTVERSION 4,8,9,0
FILEVERSION 4,8,10,0
PRODUCTVERSION 4,8,10,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "4.8.9.0"
VALUE "FileVersion", "4.8.10.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "4.8.9.0"
VALUE "ProductVersion", "4.8.10.0"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Updater.rc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,8,9,0
PRODUCTVERSION 4,8,9,0
FILEVERSION 4,8,10,0
PRODUCTVERSION 4,8,10,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -53,10 +53,10 @@ BEGIN
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "4.8.9.0"
VALUE "FileVersion", "4.8.10.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "4.8.9.0"
VALUE "ProductVersion", "4.8.10.0"
END
END
BLOCK "VarFileInfo"
Expand Down
15 changes: 14 additions & 1 deletion Telegram/SourceFiles/boxes/peer_list_controllers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,20 @@ constexpr auto kSearchPerPage = 50;
object_ptr<Ui::BoxContent> PrepareContactsBox(
not_null<Window::SessionController*> sessionController) {
using Mode = ContactsBoxController::SortMode;
auto controller = std::make_unique<ContactsBoxController>(
class Controller final : public ContactsBoxController {
public:
using ContactsBoxController::ContactsBoxController;

protected:
std::unique_ptr<PeerListRow> createRow(
not_null<UserData*> user) override {
return !user->isSelf()
? ContactsBoxController::createRow(user)
: nullptr;
}

};
auto controller = std::make_unique<Controller>(
&sessionController->session());
controller->setStyleOverrides(&st::contactsWithStories);
controller->setStoriesShown(true);
Expand Down
8 changes: 6 additions & 2 deletions Telegram/SourceFiles/boxes/username_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,12 @@ void UsernamesBox(
editor->submitted(
) | rpl::start_with_next(finish, editor->lifetime());

box->addButton(tr::lng_settings_save(), finish);
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
if (isBot) {
box->addButton(tr::lng_close(), [=] { box->closeBox(); });
} else {
box->addButton(tr::lng_settings_save(), finish);
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
}
}

void AddUsernameCheckLabel(
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/calls/group/calls_group_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,7 @@ void Panel::showNiceTooltip(
(normal ? widget().get() : container),
std::move(text),
st::groupCallNiceTooltipLabel);
label->resizeToNaturalWidth(label->naturalWidth());
if (normal) {
return label;
}
Expand Down
3 changes: 3 additions & 0 deletions Telegram/SourceFiles/core/core_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,9 @@ class Settings final {
[[nodiscard]] std::optional<uint64> macRoundIconDigest() const {
return _macRoundIconDigest;
}
[[nodiscard]] bool storiesClickTooltipHidden() const {
return _storiesClickTooltipHidden.current();
}
[[nodiscard]] rpl::producer<bool> storiesClickTooltipHiddenValue() const {
return _storiesClickTooltipHidden.value();
}
Expand Down
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
constexpr auto AppName = "Telegram Desktop"_cs;
constexpr auto AppFile = "Telegram"_cs;
constexpr auto AppVersion = 4008009;
constexpr auto AppVersionStr = "4.8.9";
constexpr auto AppVersion = 4008010;
constexpr auto AppVersionStr = "4.8.10";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
21 changes: 17 additions & 4 deletions Telegram/SourceFiles/data/data_media_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1995,11 +1995,18 @@ MediaStory::MediaStory(
owner->registerStoryItem(storyId, parent);

const auto stories = &owner->stories();
const auto maybeStory = stories->lookup(storyId);
if (!maybeStory) {
if (const auto maybeStory = stories->lookup(storyId)) {
if (!_mention) {
parent->setText((*maybeStory)->caption());
}
} else {
if (maybeStory.error() == NoStory::Unknown) {
stories->resolve(storyId, crl::guard(this, [=] {
if (!stories->lookup(storyId)) {
if (const auto maybeStory = stories->lookup(storyId)) {
if (!_mention) {
parent->setText((*maybeStory)->caption());
}
} else {
_expired = true;
}
if (_mention) {
Expand Down Expand Up @@ -2051,7 +2058,9 @@ TextWithEntities MediaStory::notificationText() const {
&& maybeStory.error() == Data::NoStory::Deleted))
? tr::lng_in_dlg_story_expired
: tr::lng_in_dlg_story)(tr::now),
parent()->originalText());
(maybeStory
? (*maybeStory)->caption()
: TextWithEntities()));
}

QString MediaStory::pinnedTextSubstring() const {
Expand Down Expand Up @@ -2091,6 +2100,9 @@ std::unique_ptr<HistoryView::Media> MediaStory::createView(
const auto stories = &parent()->history()->owner().stories();
const auto maybeStory = stories->lookup(_storyId);
if (!maybeStory) {
if (!_mention) {
realParent->setText(TextWithEntities());
}
if (maybeStory.error() == Data::NoStory::Deleted) {
_expired = true;
return nullptr;
Expand All @@ -2112,6 +2124,7 @@ std::unique_ptr<HistoryView::Media> MediaStory::createView(
message,
std::make_unique<HistoryView::StoryMention>(message, story));
} else {
realParent->setText(story->caption());
if (const auto photo = story->photo()) {
return std::make_unique<HistoryView::Photo>(
message,
Expand Down
3 changes: 2 additions & 1 deletion Telegram/SourceFiles/data/data_shared_media.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ rpl::producer<SparseIdsMergedSlice> SharedScheduledMediaViewer(
SharedMediaMergedKey key,
int limitBefore,
int limitAfter) {
Expects(!IsServerMsgId(key.mergedKey.universalId));
Expects(!key.mergedKey.universalId
|| Data::IsScheduledMsgId(key.mergedKey.universalId));
Expects((key.mergedKey.universalId != 0)
|| (limitBefore == 0 && limitAfter == 0));

Expand Down
9 changes: 8 additions & 1 deletion Telegram/SourceFiles/dialogs/dialogs.style
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,11 @@ dialogsStoriesTooltip: ImportantTooltip(defaultImportantTooltip) {
}
dialogsStoriesTooltipLabel: defaultImportantTooltipLabel;
dialogsStoriesTooltipMaxWidth: 200px;
dialogsStoriesTooltipHide: size(14px, 14px);
dialogsStoriesTooltipHide: IconButton(defaultIconButton) {
width: 34px;
height: 20px;
iconPosition: point(-1px, -1px);
icon: icon {{ "calls/video_tooltip", importantTooltipFg }};
iconOver: icon {{ "calls/video_tooltip", importantTooltipFg }};
ripple: emptyRippleAnimation;
}
34 changes: 24 additions & 10 deletions Telegram/SourceFiles/dialogs/dialogs_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,16 +813,21 @@ void Widget::setupStories() {
_scroll->viewportEvent(e);
}, _stories->lifetime());

const auto hideTooltip = [=] {
Core::App().settings().setStoriesClickTooltipHidden(true);
Core::App().saveSettingsDelayed();
};
_stories->setShowTooltip(
rpl::combine(
Core::App().settings().storiesClickTooltipHiddenValue(),
shownValue(),
!rpl::mappers::_1 && rpl::mappers::_2),
hideTooltip);
if (!Core::App().settings().storiesClickTooltipHidden()) {
// Don't create tooltip
// until storiesClickTooltipHidden can be returned to false.
const auto hideTooltip = [=] {
Core::App().settings().setStoriesClickTooltipHidden(true);
Core::App().saveSettingsDelayed();
};
_stories->setShowTooltip(
parentWidget(),
rpl::combine(
Core::App().settings().storiesClickTooltipHiddenValue(),
shownValue(),
!rpl::mappers::_1 && rpl::mappers::_2),
hideTooltip);
}

_storiesContents.fire(Stories::ContentForSession(
&controller()->session(),
Expand Down Expand Up @@ -1396,6 +1401,15 @@ void Widget::jumpToTop(bool belowPinned) {
}
}

void Widget::raiseWithTooltip() {
raise();
if (_stories) {
Ui::PostponeCall(this, [=] {
_stories->raiseTooltip();
});
}
}

void Widget::scrollToDefault(bool verytop) {
if (verytop) {
//_scroll->verticalScrollBar()->setMinimum(0);
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/dialogs/dialogs_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class Widget final : public Window::AbstractSectionWidget {
void setInnerFocus();

void jumpToTop(bool belowPinned = false);
void raiseWithTooltip();

void startWidthAnimation();
void stopWidthAnimation();
Expand Down
Loading

0 comments on commit 7280a37

Please sign in to comment.