diff --git a/.github/workflows/issue_closer.yml b/.github/workflows/issue_closer.yml
index 99e95b1d9..db58d86bd 100644
--- a/.github/workflows/issue_closer.yml
+++ b/.github/workflows/issue_closer.yml
@@ -14,6 +14,22 @@ jobs:
echo $tag
echo ::set-env name=LATEST_TAG::$tag
+ - name: Get the latest macOS version.
+ shell: python
+ run: |
+ import subprocess;
+ from xml.dom import minidom;
+
+ url = "https://osx.telegram.org/updates/versions.xml";
+ subprocess.check_call("wget %s" % url, shell=True);
+
+ xmldoc = minidom.parse('versions.xml');
+ itemlist = xmldoc.getElementsByTagName('enclosure');
+ ver = itemlist[0].attributes['sparkle:shortVersionString'].value;
+ print(ver);
+
+ subprocess.check_call("echo ::set-env name=%s::%s" % ("LATEST_MACOS", ver), shell=True);
+
- name: Check a version from an issue.
uses: actions/github-script@0.4.0
with:
@@ -75,10 +91,20 @@ jobs:
let issueNum = firstNum(issueVer);
let latestNum = firstNum(latestVer);
- if (issueNum <= latestNum && issueNum < 5) {
+ let macos_ver = process.env.LATEST_MACOS;
+ console.log("Telegram for MacOS version from website: " + macos_ver);
+
+ if (issueNum <= latestNum && issueNum < macos_ver) {
console.log("Seems the version of this issue is fine!");
return;
}
+ if (issueNum > macos_ver) {
+ let message = `Seems like it's neither the Telegram Desktop\
+ nor the Telegram for macOS version.
+ `;
+ console.log(message);
+ return;
+ }
let message = `
Sorry, but according to the version you specify in this issue, \
@@ -87,7 +113,7 @@ jobs:
You can report your issue to [the group](https://t.me/macswift) \
or to [the repository of Telegram for macOS](https://github.com/overtake/TelegramSwift).
- If I made a mistake and closed your issue wrongly, please reopen it. Thanks!
+ **If I made a mistake and closed your issue wrongly, please reopen it. Thanks!**
`;
let params = {
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 0a3d2f7e9..aab04826d 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -338,19 +338,6 @@ jobs:
sudo cp -R ffmpeg-cache/. /
- - name: PortAudio.
- run: |
- cd $LibrariesPath
-
- git clone https://git.assembla.com/portaudio.git
- cd portaudio
- git checkout 396fe4b669
- ./configure
- make -j$(nproc)
- sudo make install
- cd ..
- rm -rf portaudio
-
- name: OpenAL Soft.
run: |
cd $LibrariesPath
diff --git a/.github/workflows/master_updater.yml b/.github/workflows/master_updater.yml
new file mode 100644
index 000000000..1d8e50ae0
--- /dev/null
+++ b/.github/workflows/master_updater.yml
@@ -0,0 +1,27 @@
+name: Master branch updater.
+
+on:
+ release:
+ types: released
+
+jobs:
+ updater:
+ runs-on: ubuntu-latest
+ env:
+ SKIP: "0"
+ to_branch: "master"
+ steps:
+ - uses: actions/checkout@v1
+ - name: Push the code to the master branch.
+ run: |
+ url=https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
+ latest_tag=$(git describe --tags --abbrev=0)
+ echo "Latest tag: $latest_tag"
+
+ git remote set-url origin $url
+ git remote -v
+ git checkout master
+ git merge $latest_tag
+
+ git push origin HEAD:refs/heads/$to_branch
+ echo "Done!"
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index 6ce24e091..12e5f7cc2 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -1057,6 +1057,8 @@ PRIVATE
qrc/emoji_3.qrc
qrc/emoji_4.qrc
qrc/emoji_5.qrc
+ qrc/emoji_6.qrc
+ qrc/emoji_7.qrc
qrc/emoji_preview.qrc
qrc/telegram/telegram.qrc
qrc/telegram/sounds.qrc
diff --git a/Telegram/Resources/emoji/emoji_1.webp b/Telegram/Resources/emoji/emoji_1.webp
index e9a077929..57b7efd66 100644
Binary files a/Telegram/Resources/emoji/emoji_1.webp and b/Telegram/Resources/emoji/emoji_1.webp differ
diff --git a/Telegram/Resources/emoji/emoji_2.webp b/Telegram/Resources/emoji/emoji_2.webp
index 7340739b4..b35509a56 100644
Binary files a/Telegram/Resources/emoji/emoji_2.webp and b/Telegram/Resources/emoji/emoji_2.webp differ
diff --git a/Telegram/Resources/emoji/emoji_3.webp b/Telegram/Resources/emoji/emoji_3.webp
index 52f46cb21..2bbcaf5ca 100644
Binary files a/Telegram/Resources/emoji/emoji_3.webp and b/Telegram/Resources/emoji/emoji_3.webp differ
diff --git a/Telegram/Resources/emoji/emoji_4.webp b/Telegram/Resources/emoji/emoji_4.webp
index ec02f362b..23dc06827 100644
Binary files a/Telegram/Resources/emoji/emoji_4.webp and b/Telegram/Resources/emoji/emoji_4.webp differ
diff --git a/Telegram/Resources/emoji/emoji_5.webp b/Telegram/Resources/emoji/emoji_5.webp
index b1b739352..62f25fdd7 100644
Binary files a/Telegram/Resources/emoji/emoji_5.webp and b/Telegram/Resources/emoji/emoji_5.webp differ
diff --git a/Telegram/Resources/emoji/emoji_6.webp b/Telegram/Resources/emoji/emoji_6.webp
new file mode 100644
index 000000000..6f3c0e1ec
Binary files /dev/null and b/Telegram/Resources/emoji/emoji_6.webp differ
diff --git a/Telegram/Resources/emoji/emoji_7.webp b/Telegram/Resources/emoji/emoji_7.webp
new file mode 100644
index 000000000..e21685c91
Binary files /dev/null and b/Telegram/Resources/emoji/emoji_7.webp differ
diff --git a/Telegram/Resources/qrc/emoji_6.qrc b/Telegram/Resources/qrc/emoji_6.qrc
new file mode 100644
index 000000000..de19569bd
--- /dev/null
+++ b/Telegram/Resources/qrc/emoji_6.qrc
@@ -0,0 +1,5 @@
+
+
+ ../emoji/emoji_6.webp
+
+
diff --git a/Telegram/Resources/qrc/emoji_7.qrc b/Telegram/Resources/qrc/emoji_7.qrc
new file mode 100644
index 000000000..744094fba
--- /dev/null
+++ b/Telegram/Resources/qrc/emoji_7.qrc
@@ -0,0 +1,5 @@
+
+
+ ../emoji/emoji_7.webp
+
+
diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 1a625857d..4fe6090c8 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -9,7 +9,7 @@
+ Version="2.1.4.0" />
Telegram Desktop
Telegram FZ-LLC
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index 60d00ccbf..519ded4b8 100644
--- a/Telegram/Resources/winrc/Telegram.rc
+++ b/Telegram/Resources/winrc/Telegram.rc
@@ -33,8 +33,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,1,2,0
- PRODUCTVERSION 2,1,2,0
+ FILEVERSION 2,1,4,0
+ PRODUCTVERSION 2,1,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -51,10 +51,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
- VALUE "FileVersion", "2.1.2.0"
+ VALUE "FileVersion", "2.1.4.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "2.1.2.0"
+ VALUE "ProductVersion", "2.1.4.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 62f3d2df6..9e1f6fbd6 100644
--- a/Telegram/Resources/winrc/Updater.rc
+++ b/Telegram/Resources/winrc/Updater.rc
@@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,1,2,0
- PRODUCTVERSION 2,1,2,0
+ FILEVERSION 2,1,4,0
+ PRODUCTVERSION 2,1,4,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -42,10 +42,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater"
- VALUE "FileVersion", "2.1.2.0"
+ VALUE "FileVersion", "2.1.4.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "2.1.2.0"
+ VALUE "ProductVersion", "2.1.4.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/api/api_text_entities.cpp b/Telegram/SourceFiles/api/api_text_entities.cpp
index eb3f0ebf1..919a18c63 100644
--- a/Telegram/SourceFiles/api/api_text_entities.cpp
+++ b/Telegram/SourceFiles/api/api_text_entities.cpp
@@ -82,6 +82,7 @@ MTPVector EntitiesToMTP(
if (entity.length() <= 0) continue;
if (option == ConvertOption::SkipLocal
&& entity.type() != EntityType::Bold
+ //&& entity.type() != EntityType::Semibold // Not in API.
&& entity.type() != EntityType::Italic
&& entity.type() != EntityType::Underline
&& entity.type() != EntityType::StrikeOut
diff --git a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp
index 5fab61356..34b0c8fb3 100644
--- a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp
+++ b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp
@@ -584,5 +584,9 @@ void ChooseRecipientBoxController::rowClicked(not_null row) {
auto ChooseRecipientBoxController::createRow(
not_null history) -> std::unique_ptr {
- return std::make_unique(history);
+ const auto peer = history->peer;
+ const auto skip = peer->isChannel()
+ && !peer->isMegagroup()
+ && !peer->canWrite();
+ return skip ? nullptr : std::make_unique(history);
}
diff --git a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
index a59a2a2e9..ea94dcb54 100644
--- a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
+++ b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
@@ -40,15 +40,15 @@ inline auto PreviewPath(int i) {
const auto kSets = {
Set{ {0, 0, 0, "Mac"}, PreviewPath(0) },
- Set{ {1, 246, 7'336'383, "Android"}, PreviewPath(1) },
- Set{ {2, 206, 5'038'738, "Twemoji"}, PreviewPath(2) },
- Set{ {3, 238, 6'992'260, "JoyPixels"}, PreviewPath(3) },
+ Set{ {1, 713, 7'313'166, "Android"}, PreviewPath(1) },
+ Set{ {2, 714, 4'690'333, "Twemoji"}, PreviewPath(2) },
+ Set{ {3, 716, 5'968'021, "JoyPixels"}, PreviewPath(3) },
};
using Loading = MTP::DedicatedLoader::Progress;
using SetState = BlobState;
-class Loader : public BlobLoader {
+class Loader final : public BlobLoader {
public:
Loader(
QObject *parent,
@@ -60,6 +60,9 @@ public:
void destroy() override;
void unpack(const QString &path) override;
+private:
+ void fail() override;
+
};
class Inner : public Ui::RpWidget {
@@ -155,12 +158,14 @@ bool UnpackSet(const QString &path, const QString &folder) {
return UnpackBlob(path, folder, GoodSetPartName);
}
+
Loader::Loader(
QObject *parent,
int id,
MTP::DedicatedLoader::Location location,
const QString &folder,
- int size) : BlobLoader(parent, id, location, folder, size) {
+ int size)
+: BlobLoader(parent, id, location, folder, size) {
}
void Loader::unpack(const QString &path) {
@@ -190,6 +195,11 @@ void Loader::destroy() {
SetGlobalLoader(nullptr);
}
+void Loader::fail() {
+ ClearNeedSwitchToId();
+ BlobLoader::fail();
+}
+
Inner::Inner(QWidget *parent) : RpWidget(parent) {
setupContent();
}
@@ -401,12 +411,7 @@ void Row::setupHandler() {
}
void Row::load() {
- SetGlobalLoader(base::make_unique_q(
- App::main(),
- _id,
- GetDownloadLocation(_id),
- internal::SetDataPath(_id),
- GetDownloadSize(_id)));
+ LoadAndSwitchTo(_id);
}
void Row::setupLabels(const Set &set) {
@@ -538,5 +543,20 @@ void ManageSetsBox::prepare() {
setDimensionsToContent(st::boxWidth, inner);
}
+void LoadAndSwitchTo(int id) {
+ Expects(App::main() != nullptr);
+
+ if (!ranges::contains(kSets, id, &Set::id)) {
+ ClearNeedSwitchToId();
+ return;
+ }
+ SetGlobalLoader(base::make_unique_q(
+ App::main(),
+ id,
+ GetDownloadLocation(id),
+ internal::SetDataPath(id),
+ GetDownloadSize(id)));
+}
+
} // namespace Emoji
} // namespace Ui
diff --git a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.h b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.h
index 316b06100..39ea5fd35 100644
--- a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.h
+++ b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.h
@@ -21,5 +21,7 @@ protected:
};
+void LoadAndSwitchTo(int id);
+
} // namespace Emoji
} // namespace Ui
diff --git a/Telegram/SourceFiles/core/local_url_handlers.cpp b/Telegram/SourceFiles/core/local_url_handlers.cpp
index d38b4024b..68aaf5082 100644
--- a/Telegram/SourceFiles/core/local_url_handlers.cpp
+++ b/Telegram/SourceFiles/core/local_url_handlers.cpp
@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/connection_box.h"
#include "boxes/sticker_set_box.h"
#include "boxes/sessions_box.h"
+#include "boxes/language_box.h"
#include "passport/passport_form_controller.h"
#include "window/window_session_controller.h"
#include "data/data_session.h"
@@ -102,12 +103,21 @@ bool ShowTheme(
return true;
}
+void ShowLanguagesBox() {
+ static auto Guard = base::binary_guard();
+ Guard = LanguageBox::Show();
+}
+
bool SetLanguage(
Main::Session *session,
const Match &match,
const QVariant &context) {
- const auto languageId = match->captured(1);
- Lang::CurrentCloudManager().switchWithWarning(languageId);
+ if (match->capturedRef(1).isEmpty()) {
+ ShowLanguagesBox();
+ } else {
+ const auto languageId = match->captured(2);
+ Lang::CurrentCloudManager().switchWithWarning(languageId);
+ }
return true;
}
@@ -358,6 +368,9 @@ bool ResolveSettings(
if (section == qstr("devices")) {
Ui::show(Box(session));
return true;
+ } else if (section == qstr("language")) {
+ ShowLanguagesBox();
+ return true;
}
const auto type = (section == qstr("folders"))
? ::Settings::Type::Folders
@@ -450,7 +463,7 @@ const std::vector &LocalUrlHandlers() {
ShowTheme
},
{
- qsl("^setlanguage/?\\?lang=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"),
+ qsl("^setlanguage/?(\\?lang=([a-zA-Z0-9\\.\\_\\-]+))?(&|$)"),
SetLanguage
},
{
@@ -490,7 +503,7 @@ const std::vector &LocalUrlHandlers() {
ResolvePrivatePost
},
{
- qsl("^settings(/folders|/devices|/kotato)?$"),
+ qsl("^settings(/folders|/devices|/language|/kotato?$"),
ResolveSettings
},
{
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index 29c7aae6f..603680355 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -23,7 +23,7 @@ constexpr auto AppId = "{C4A4AE8F-B9F7-4CC7-8A6C-BF7EEE87ACA5}"_cs;
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
constexpr auto AppName = "Kotatogram Desktop"_cs;
constexpr auto AppFile = "Kotatogram"_cs;
-constexpr auto AppVersion = 2001002;
-constexpr auto AppVersionStr = "2.1.2";
+constexpr auto AppVersion = 2001004;
+constexpr auto AppVersionStr = "2.1.4";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
index 922f0d303..e3a65d860 100644
--- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
+++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
@@ -479,7 +479,7 @@ void InnerWidget::updateEmptyText() {
options.flags |= TextParseMarkdown;
auto hasSearch = !_searchQuery.isEmpty();
auto hasFilter = (_filter.flags != 0) || !_filter.allUsers;
- auto text = Ui::Text::Bold((hasSearch || hasFilter)
+ auto text = Ui::Text::Semibold((hasSearch || hasFilter)
? tr::lng_admin_log_no_results_title(tr::now)
: tr::lng_admin_log_no_events_title(tr::now));
auto description = hasSearch
diff --git a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp
index 8a438534e..5dcc98492 100644
--- a/Telegram/SourceFiles/history/view/media/history_view_dice.cpp
+++ b/Telegram/SourceFiles/history/view/media/history_view_dice.cpp
@@ -53,7 +53,7 @@ namespace {
auto link = Ui::Text::Link(
tr::lng_about_random_send(tr::now).toUpper());
link.entities.push_back(
- EntityInText(EntityType::Bold, 0, link.text.size()));
+ EntityInText(EntityType::Semibold, 0, link.text.size()));
config.text.append(' ').append(std::move(link));
config.filter = crl::guard(&history->session(), [=](
const ClickHandlerPtr &handler,
diff --git a/Telegram/SourceFiles/intro/intro_qr.cpp b/Telegram/SourceFiles/intro/intro_qr.cpp
index 51294a4a4..e2c00a82d 100644
--- a/Telegram/SourceFiles/intro/intro_qr.cpp
+++ b/Telegram/SourceFiles/intro/intro_qr.cpp
@@ -269,7 +269,7 @@ void QrWidget::setupControls() {
st::introQrStepMargins);
const auto number = Ui::CreateChild(
steps,
- rpl::single(Ui::Text::Bold(QString::number(++index) + ".")),
+ rpl::single(Ui::Text::Semibold(QString::number(++index) + ".")),
st::defaultFlatLabel);
rpl::combine(
number->widthValue(),
diff --git a/Telegram/SourceFiles/intro/intro_step.cpp b/Telegram/SourceFiles/intro/intro_step.cpp
index b21b19d8f..62baf4157 100644
--- a/Telegram/SourceFiles/intro/intro_step.cpp
+++ b/Telegram/SourceFiles/intro/intro_step.cpp
@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/slide_animation.h"
#include "data/data_user.h"
#include "data/data_auto_download.h"
+#include "window/window_controller.h"
#include "window/themes/window_theme.h"
#include "facades.h"
#include "app.h"
@@ -140,7 +141,7 @@ void Step::finish(const MTPUser &user, QImage &&photo) {
const auto weak = base::make_weak(account.get());
account->createSession(user);
Local::writeMtpData();
- App::wnd()->setupMain();
+ App::wnd()->controller().setupMain();
// "this" is already deleted here by creating the main widget.
if (weak && account->sessionExists()) {
diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
index 06b4ae259..3bc9a3845 100644
--- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
@@ -62,13 +62,13 @@ Instance::Instance() : _inner(new Inner(&_thread)) {
void Instance::check() {
_available = false;
- if (auto device = alcCaptureOpenDevice(nullptr, kCaptureFrequency, AL_FORMAT_MONO16, kCaptureFrequency / 5)) {
- auto error = ErrorHappened(device);
- alcCaptureCloseDevice(device);
- _available = !error;
- } else {
- LOG(("Audio Error: Could not open capture device!"));
+ if (auto device = alcGetString(0, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)) {
+ if (!QString::fromLocal8Bit(device).isEmpty()) {
+ _available = true;
+ return;
+ }
}
+ LOG(("Audio Error: No capture device found!"));
}
Instance::~Instance() {
diff --git a/Telegram/SourceFiles/media/player/media_player_widget.cpp b/Telegram/SourceFiles/media/player/media_player_widget.cpp
index ce4d2a12c..2bbad2d24 100644
--- a/Telegram/SourceFiles/media/player/media_player_widget.cpp
+++ b/Telegram/SourceFiles/media/player/media_player_widget.cpp
@@ -544,7 +544,7 @@ void Widget::handleSongChange() {
textWithEntities.text = name + ' ' + date();
textWithEntities.entities.append(EntityInText(
- EntityType::Bold,
+ EntityType::Semibold,
0,
name.size(),
QString()));
@@ -565,7 +565,12 @@ void Widget::handleSongChange() {
: TextUtilities::Clean(song->title);
auto dash = QString::fromUtf8(" \xe2\x80\x93 ");
textWithEntities.text = song->performer + dash + title;
- textWithEntities.entities.append({ EntityType::Bold, 0, song->performer.size(), QString() });
+ textWithEntities.entities.append({
+ EntityType::Semibold,
+ 0,
+ song->performer.size(),
+ QString()
+ });
}
}
_nameLabel->setMarkedText(textWithEntities);
diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp
index 2b85773eb..442b5bf5a 100644
--- a/Telegram/SourceFiles/overview/overview_layout.cpp
+++ b/Telegram/SourceFiles/overview/overview_layout.cpp
@@ -55,13 +55,27 @@ TextWithEntities ComposeNameWithEntities(DocumentData *document) {
result.text = document->filename().isEmpty()
? qsl("Unknown File")
: document->filename();
- result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
+ result.entities.push_back({
+ EntityType::Semibold,
+ 0,
+ result.text.size()
+ });
} else if (song->performer.isEmpty()) {
result.text = song->title;
- result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
+ result.entities.push_back({
+ EntityType::Semibold,
+ 0,
+ result.text.size()
+ });
} else {
- result.text = song->performer + QString::fromUtf8(" \xe2\x80\x93 ") + (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
- result.entities.push_back({ EntityType::Bold, 0, song->performer.size() });
+ result.text = song->performer
+ + QString::fromUtf8(" \xe2\x80\x93 ")
+ + (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
+ result.entities.push_back({
+ EntityType::Semibold,
+ 0,
+ song->performer.size()
+ });
}
return result;
}
diff --git a/Telegram/SourceFiles/storage/storage_cloud_blob.cpp b/Telegram/SourceFiles/storage/storage_cloud_blob.cpp
index 41d7d1c9d..300dffd91 100644
--- a/Telegram/SourceFiles/storage/storage_cloud_blob.cpp
+++ b/Telegram/SourceFiles/storage/storage_cloud_blob.cpp
@@ -40,9 +40,9 @@ bool ExtractZipFile(zlib::FileToRead &zip, const QString path) {
} // namespace
bool UnpackBlob(
- const QString &path,
- const QString &folder,
- Fn checkNameCallback) {
+ const QString &path,
+ const QString &folder,
+ Fn checkNameCallback) {
const auto bytes = ReadFinalFile(path);
if (bytes.isEmpty()) {
return false;
diff --git a/Telegram/SourceFiles/window/window_controller.cpp b/Telegram/SourceFiles/window/window_controller.cpp
index a89616730..8252f175d 100644
--- a/Telegram/SourceFiles/window/window_controller.cpp
+++ b/Telegram/SourceFiles/window/window_controller.cpp
@@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/layers/box_content.h"
#include "ui/layers/layer_widget.h"
#include "ui/toast/toast.h"
+#include "ui/emoji_config.h"
+#include "chat_helpers/emoji_sets_manager.h"
#include "window/window_session_controller.h"
#include "window/themes/window_theme.h"
#include "window/themes/window_theme_editor.h"
@@ -82,6 +84,10 @@ void Controller::setupIntro() {
void Controller::setupMain() {
_widget.setupMain();
+
+ if (const auto id = Ui::Emoji::NeedToSwitchBackToId()) {
+ Ui::Emoji::LoadAndSwitchTo(id);
+ }
}
void Controller::showSettings() {
diff --git a/Telegram/build/build.sh b/Telegram/build/build.sh
index a503d7fc1..19da165c6 100755
--- a/Telegram/build/build.sh
+++ b/Telegram/build/build.sh
@@ -13,6 +13,12 @@ if [ ! -d "$FullScriptPath/../../../DesktopPrivate" ]; then
exit
fi
+if [ "$1" == "request_uuid" ]; then
+ if [ "$2" != "" ]; then
+ NotarizeRequestId="$2"
+ fi
+fi
+
Error () {
cd $FullExecPath
echo "$1"
@@ -260,96 +266,102 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
Error "Backup path not found!"
fi
- ./configure.sh
+ if [ "$NotarizeRequestId" == "" ]; then
+ ./configure.sh
- cd $ProjectPath
- cmake --build . --config Release --target Telegram
- cd $ReleasePath
+ cd $ProjectPath
+ cmake --build . --config Release --target Telegram
- if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
- Error "$BinaryName.app not found!"
- fi
+ cd $ReleasePath
- if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
- Error "$BinaryName.app.dSYM not found!"
- fi
-
- if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
- if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
- Error "Updater not found!"
+ if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
+ Error "$BinaryName.app not found!"
fi
- if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then
- Error "crashpad_handler not found!"
+
+ if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
+ Error "$BinaryName.app.dSYM not found!"
fi
- fi
- if [ "$BuildTarget" == "macstore" ]; then
- if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then
- Error "Breakpad.framework not found!"
+
+ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
+ if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
+ Error "Updater not found!"
+ fi
+ if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Helpers/crashpad_handler" ]; then
+ Error "crashpad_handler not found!"
+ fi
fi
- fi
-
- echo "Dumping debug symbols.."
- "$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
- echo "Done!"
-
- echo "Stripping the executable.."
- strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
- echo "Done!"
-
- echo "Signing the application.."
- if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
- codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements"
- elif [ "$BuildTarget" == "macstore" ]; then
- codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements"
- echo "Making an installer.."
- productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg"
- fi
- echo "Done!"
-
- AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
- DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
- if [ "$AppUUID" != "$DsymUUID" ]; then
- Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
- fi
-
- if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
- Error "Icon.icns not found in Resources!"
- fi
-
- if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
- Error "$BinaryName not found in MacOS!"
- fi
-
- if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
- Error "$BinaryName signature not found!"
- fi
-
- if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
- if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
- Error "Updater not found in Frameworks!"
+ if [ "$BuildTarget" == "macstore" ]; then
+ if [ ! -d "$ReleasePath/$BinaryName.app/Contents/Frameworks/Breakpad.framework" ]; then
+ Error "Breakpad.framework not found!"
+ fi
fi
- elif [ "$BuildTarget" == "macstore" ]; then
- if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
- Error "$BinaryName.pkg not found!"
- fi
- fi
- SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
- echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
- mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
- cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
- echo "Done!"
+ echo "Dumping debug symbols.."
+ "$HomePath/../../Libraries/macos/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
+ echo "Done!"
+
+ echo "Stripping the executable.."
+ strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
+ echo "Done!"
+
+ echo "Signing the application.."
+ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
+ codesign --force --deep --timestamp --options runtime --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram.entitlements"
+ elif [ "$BuildTarget" == "macstore" ]; then
+ codesign --force --deep --sign "3rd Party Mac Developer Application: Telegram FZ-LLC (C67CF9S4VU)" "$ReleasePath/$BinaryName.app" --entitlements "$HomePath/Telegram/Telegram Lite.entitlements"
+ echo "Making an installer.."
+ productbuild --sign "3rd Party Mac Developer Installer: Telegram FZ-LLC (C67CF9S4VU)" --component "$ReleasePath/$BinaryName.app" /Applications "$ReleasePath/$BinaryName.pkg"
+ fi
+ echo "Done!"
+
+ AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
+ DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
+ if [ "$AppUUID" != "$DsymUUID" ]; then
+ Error "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
+ fi
+
+ if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
+ Error "Icon.icns not found in Resources!"
+ fi
+
+ if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
+ Error "$BinaryName not found in MacOS!"
+ fi
+
+ if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
+ Error "$BinaryName signature not found!"
+ fi
+
+ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
+ if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
+ Error "Updater not found in Frameworks!"
+ fi
+ elif [ "$BuildTarget" == "macstore" ]; then
+ if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
+ Error "$BinaryName.pkg not found!"
+ fi
+ fi
+
+ SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
+ echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
+ mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
+ cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
+ echo "Done!"
+ fi
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ]; then
cd "$ReleasePath"
- if [ "$AlphaVersion" == "0" ]; then
- cp -f tsetup_template.dmg tsetup.temp.dmg
- TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'`
- cp -R "./$BinaryName.app" "$TempDiskPath/"
- bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/"
- hdiutil detach "$TempDiskPath"
- hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
- rm tsetup.temp.dmg
+
+ if [ "$NotarizeRequestId" == "" ]; then
+ if [ "$AlphaVersion" == "0" ]; then
+ cp -f tsetup_template.dmg tsetup.temp.dmg
+ TempDiskPath=`hdiutil attach -nobrowse -noautoopenrw -readwrite tsetup.temp.dmg | awk -F "\t" 'END {print $3}'`
+ cp -R "./$BinaryName.app" "$TempDiskPath/"
+ bless --folder "$TempDiskPath/" --openfolder "$TempDiskPath/"
+ hdiutil detach "$TempDiskPath"
+ hdiutil convert tsetup.temp.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
+ rm tsetup.temp.dmg
+ fi
fi
if [ "$AlphaVersion" != "0" ]; then
@@ -366,33 +378,40 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
UpdateFile="${UpdateFile}_${AlphaSignature}"
SetupFile="talpha${AlphaVersion}_${AlphaSignature}.zip"
- rm -rf "$ReleasePath/AlphaTemp"
- mkdir "$ReleasePath/AlphaTemp"
- mkdir "$ReleasePath/AlphaTemp/$BinaryName"
- cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/"
- cd "$ReleasePath/AlphaTemp"
- zip -r "$SetupFile" "$BinaryName"
- mv "$SetupFile" "$ReleasePath/"
- cd "$ReleasePath"
+ if [ "$NotarizeRequestId" == "" ]; then
+ rm -rf "$ReleasePath/AlphaTemp"
+ mkdir "$ReleasePath/AlphaTemp"
+ mkdir "$ReleasePath/AlphaTemp/$BinaryName"
+ cp -r "$ReleasePath/$BinaryName.app" "$ReleasePath/AlphaTemp/$BinaryName/"
+ cd "$ReleasePath/AlphaTemp"
+ zip -r "$SetupFile" "$BinaryName"
+ mv "$SetupFile" "$ReleasePath/"
+ cd "$ReleasePath"
+ fi
fi
if [ "$BuildTarget" == "mac" ]; then
- echo "Beginning notarization process."
- set +e
- xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt
- set -e
- while IFS='' read -r line || [[ -n "$line" ]]; do
- Prefix=$(echo $line | cut -d' ' -f 1)
- Value=$(echo $line | cut -d' ' -f 3)
- if [ "$Prefix" == "RequestUUID" ]; then
- RequestUUID=$Value
+ if [ "$NotarizeRequestId" == "" ]; then
+ echo "Beginning notarization process."
+ set +e
+ xcrun altool --notarize-app --primary-bundle-id "com.tdesktop.Telegram" --username "$AC_USERNAME" --password "@keychain:AC_PASSWORD" --file "$SetupFile" > request_uuid.txt
+ set -e
+ while IFS='' read -r line || [[ -n "$line" ]]; do
+ Prefix=$(echo $line | cut -d' ' -f 1)
+ Value=$(echo $line | cut -d' ' -f 3)
+ if [ "$Prefix" == "RequestUUID" ]; then
+ RequestUUID=$Value
+ fi
+ done < "request_uuid.txt"
+ if [ "$RequestUUID" == "" ]; then
+ cat request_uuid.txt
+ Error "Could not extract Request UUID."
fi
- done < "request_uuid.txt"
- if [ "$RequestUUID" == "" ]; then
- cat request_uuid.txt
- Error "Could not extract Request UUID."
+ echo "Request UUID: $RequestUUID"
+ rm request_uuid.txt
+ else
+ RequestUUID=$NotarizeRequestId
+ echo "Continue notarization process with Request UUID: $RequestUUID"
fi
- echo "Request UUID: $RequestUUID"
- rm request_uuid.txt
RequestStatus=
LogFile=
@@ -419,7 +438,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
echo "Notarization problems, response:"
cat request_result.txt
if [ "$LogFile" != "" ]; then
- echo "Requesting log..."
+ echo "Requesting log: $LogFile"
curl $LogFile
fi
Error "Notarization FAILED."
@@ -427,7 +446,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
rm request_result.txt
if [ "$LogFile" != "" ]; then
- echo "Requesting log..."
+ echo "Requesting log: $LogFile"
curl $LogFile > request_log.txt
fi
diff --git a/Telegram/build/version b/Telegram/build/version
index 07ef7a8ba..777344683 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,7 +1,7 @@
-AppVersion 2001002
+AppVersion 2001004
AppVersionStrMajor 2.1
-AppVersionStrSmall 2.1.2
-AppVersionStr 2.1.2
+AppVersionStrSmall 2.1.4
+AppVersionStr 2.1.4
BetaChannel 0
AlphaVersion 0
-AppVersionOriginal 2.1.2
+AppVersionOriginal 2.1.4
diff --git a/Telegram/codegen b/Telegram/codegen
index f6431b149..8b4686f24 160000
--- a/Telegram/codegen
+++ b/Telegram/codegen
@@ -1 +1 @@
-Subproject commit f6431b149b199238b5bd8f315c656780c1e3bcd1
+Subproject commit 8b4686f24d80f1f8d6a4ad0d6a55bf1bb701f35a
diff --git a/Telegram/lib_ui b/Telegram/lib_ui
index 8bab33ccc..3cca2516c 160000
--- a/Telegram/lib_ui
+++ b/Telegram/lib_ui
@@ -1 +1 @@
-Subproject commit 8bab33ccc92ace699a2a4eef036e179e128bbfd8
+Subproject commit 3cca2516c251fbd1fd79ea6c56016acc24a8ea08
diff --git a/changelog.txt b/changelog.txt
index 8c4d43757..9f00bccb4 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,13 @@
+2.1.4 (08.05.20)
+
+- Improve bold font selection.
+
+2.1.3 (08.05.20)
+
+- Added support for new emoji.
+- Channels to which you can't post will no longer be suggested when forwarding.
+- Improved font selection and bold font support for CJK and Farsi.
+
2.1.2 (05.05.20)
- Fix polls and quizes results viewing.
diff --git a/docs/building-cmake.md b/docs/building-cmake.md
index f16f8c4cd..0804dd124 100644
--- a/docs/building-cmake.md
+++ b/docs/building-cmake.md
@@ -189,14 +189,6 @@ Go to ***BuildPath*** and run
sudo make install
cd ..
- git clone https://git.assembla.com/portaudio.git
- cd portaudio
- git checkout 396fe4b669
- ./configure
- make $MAKE_THREADS_CNT
- sudo make install
- cd ..
-
git clone git://repo.or.cz/openal-soft.git
cd openal-soft
git checkout openal-soft-1.20.1
@@ -244,7 +236,6 @@ Go to ***BuildPath*** and run
git submodule update qtsvg
cd qtbase
git apply ../../patches/qtbase_5_12_8.diff
- cd src/plugins/platforminputcontexts
cd ..
OPENSSL_DIR=/usr/local/desktop-app/openssl-1.1.1