Updated TDesktop sources to 3.1.1+0984e63
This commit is contained in:
commit
e151ab45b3
22 changed files with 98 additions and 44 deletions
14
.github/workflows/win.yml
vendored
14
.github/workflows/win.yml
vendored
|
|
@ -266,12 +266,16 @@ jobs:
|
|||
- name: Opus.
|
||||
if: steps.cache-opus.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone %GIT%/telegramdesktop/opus.git
|
||||
git clone -b v1.3.1 %GIT%/xiph/opus.git
|
||||
cd opus
|
||||
git checkout tdesktop
|
||||
cd win32\VS2015
|
||||
msbuild -m opus.sln /property:Configuration=Debug /property:Platform="Win32"
|
||||
msbuild -m opus.sln /property:Configuration=Release /property:Platform="Win32"
|
||||
cmake -B out . ^
|
||||
-A Win32 ^
|
||||
-DCMAKE_INSTALL_PREFIX=%LibrariesPath%/local/opus ^
|
||||
-DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" ^
|
||||
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG"
|
||||
cmake --build out --config Debug
|
||||
cmake --build out --config Release
|
||||
cmake --install out --config Release
|
||||
|
||||
- name: Rnnoise.
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="3.1.0.0" />
|
||||
Version="3.1.1.0" />
|
||||
<Properties>
|
||||
<DisplayName>Telegram Desktop</DisplayName>
|
||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,1,0,0
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEVERSION 3,1,1,0
|
||||
PRODUCTVERSION 3,1,1,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
|
@ -62,10 +62,10 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Telegram FZ-LLC"
|
||||
VALUE "FileDescription", "Telegram Desktop"
|
||||
VALUE "FileVersion", "3.1.0.0"
|
||||
VALUE "FileVersion", "3.1.1.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "3.1.0.0"
|
||||
VALUE "ProductVersion", "3.1.1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,1,0,0
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEVERSION 3,1,1,0
|
||||
PRODUCTVERSION 3,1,1,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
|
@ -53,10 +53,10 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Telegram FZ-LLC"
|
||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||
VALUE "FileVersion", "3.1.0.0"
|
||||
VALUE "FileVersion", "3.1.1.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "3.1.0.0"
|
||||
VALUE "ProductVersion", "3.1.1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,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 = 3001000;
|
||||
constexpr auto AppVersionStr = "3.1";
|
||||
constexpr auto AppVersion = 3001001;
|
||||
constexpr auto AppVersionStr = "3.1.1";
|
||||
constexpr auto AppBetaVersion = false;
|
||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||
|
|
|
|||
|
|
@ -341,6 +341,9 @@ enum class MessageFlag : uint32 {
|
|||
|
||||
// Fake message for some UI element.
|
||||
FakeHistoryItem = (1U << 27),
|
||||
|
||||
// Contact sign-up message, notification should be skipped for Silent.
|
||||
IsContactSignUp = (1U << 28),
|
||||
};
|
||||
inline constexpr bool is_flag_type(MessageFlag) { return true; }
|
||||
using MessageFlags = base::flags<MessageFlag>;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Editor {
|
||||
|
||||
QImage ImageModified(QImage image, const PhotoModifications &mods) {
|
||||
Expects(!image.isNull());
|
||||
|
||||
if (!mods) {
|
||||
return image;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -460,6 +460,17 @@ bool HistoryItem::isScheduled() const {
|
|||
&& (_flags & MessageFlag::IsOrWasScheduled);
|
||||
}
|
||||
|
||||
bool HistoryItem::skipNotification() const {
|
||||
if (isSilent() && (_flags & MessageFlag::IsContactSignUp)) {
|
||||
return true;
|
||||
} else if (const auto forwarded = Get<HistoryMessageForwarded>()) {
|
||||
if (forwarded->imported) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void HistoryItem::destroy() {
|
||||
_history->destroyMessage(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ public:
|
|||
[[nodiscard]] bool isAdminLogEntry() const;
|
||||
[[nodiscard]] bool isFromScheduled() const;
|
||||
[[nodiscard]] bool isScheduled() const;
|
||||
[[nodiscard]] bool skipNotification() const;
|
||||
|
||||
void addLogEntryOriginal(
|
||||
WebPageId localId,
|
||||
|
|
|
|||
|
|
@ -564,6 +564,8 @@ void HistoryService::applyAction(const MTPMessageAction &action) {
|
|||
_flags |= MessageFlag::IsGroupEssential;
|
||||
}, [&](const MTPDmessageActionChannelMigrateFrom &) {
|
||||
_flags |= MessageFlag::IsGroupEssential;
|
||||
}, [&](const MTPDmessageActionContactSignUp &) {
|
||||
_flags |= MessageFlag::IsContactSignUp;
|
||||
}, [](const auto &) {
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -790,7 +790,7 @@ void MainWindow::toggleDisplayNotifyFromTray() {
|
|||
settings.setRememberedFlashBounceNotifyFromTray(false);
|
||||
}
|
||||
}
|
||||
account().session().saveSettings();
|
||||
Core::App().saveSettingsDelayed();
|
||||
using Change = Window::Notifications::ChangeType;
|
||||
auto ¬ifications = Core::App().notifications();
|
||||
notifications.notifySettingsChanged(Change::DesktopEnabled);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ bool HasExtensionFrom(const QString &file, const QStringList &extensions) {
|
|||
bool ValidPhotoForAlbum(
|
||||
const Image &image,
|
||||
const QString &mime) {
|
||||
Expects(!image.data.isNull());
|
||||
|
||||
if (image.animated
|
||||
|| Core::IsMimeSticker(mime)
|
||||
|| (!mime.isEmpty() && !mime.startsWith(u"image/"))) {
|
||||
|
|
@ -228,6 +230,8 @@ PreparedList PrepareMediaFromImage(
|
|||
QImage &&image,
|
||||
QByteArray &&content,
|
||||
int previewWidth) {
|
||||
Expects(!image.isNull());
|
||||
|
||||
auto result = PreparedList();
|
||||
auto file = PreparedFile(QString());
|
||||
file.content = content;
|
||||
|
|
@ -288,6 +292,7 @@ void PrepareDetails(PreparedFile &file, int previewWidth) {
|
|||
using Song = PreparedFileInformation::Song;
|
||||
if (const auto image = std::get_if<Image>(
|
||||
&file.information->media)) {
|
||||
Assert(!image->data.isNull());
|
||||
if (ValidPhotoForAlbum(*image, file.information->filemime)) {
|
||||
UpdateImageDetails(file, previewWidth);
|
||||
file.type = PreparedFile::Type::Photo;
|
||||
|
|
@ -317,14 +322,18 @@ void UpdateImageDetails(PreparedFile &file, int previewWidth) {
|
|||
if (!image) {
|
||||
return;
|
||||
}
|
||||
const auto &preview = image->modifications
|
||||
Assert(!image->data.isNull());
|
||||
auto preview = image->modifications
|
||||
? Editor::ImageModified(image->data, image->modifications)
|
||||
: image->data;
|
||||
Assert(!preview.isNull());
|
||||
file.shownDimensions = PrepareShownDimensions(preview);
|
||||
file.preview = Images::prepareOpaque(preview.scaledToWidth(
|
||||
std::min(previewWidth, style::ConvertScale(preview.width()))
|
||||
* cIntRetinaFactor(),
|
||||
Qt::SmoothTransformation));
|
||||
const auto scaled = preview.scaledToWidth(
|
||||
(std::min(previewWidth, style::ConvertScale(preview.width()))
|
||||
* cIntRetinaFactor()),
|
||||
Qt::SmoothTransformation);
|
||||
Assert(!scaled.isNull());
|
||||
file.preview = Images::prepareOpaque(scaled);
|
||||
Assert(!file.preview.isNull());
|
||||
file.preview.setDevicePixelRatio(cRetinaFactor());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,25 +100,21 @@ System::SkipState System::skipNotification(
|
|||
not_null<HistoryItem*> item) const {
|
||||
const auto history = item->history();
|
||||
const auto notifyBy = item->specialNotificationPeer();
|
||||
if (App::quitting() || !history->currentNotification()) {
|
||||
if (App::quitting()
|
||||
|| !history->currentNotification()
|
||||
|| item->skipNotification()) {
|
||||
return { SkipState::Skip };
|
||||
} else if (!Core::App().settings().notifyFromAll()
|
||||
&& &history->session().account() != &Core::App().domain().active()) {
|
||||
return { SkipState::Skip };
|
||||
}
|
||||
const auto scheduled = item->out() && item->isFromScheduled();
|
||||
|
||||
if (const auto forwarded = item->Get<HistoryMessageForwarded>()) {
|
||||
if (forwarded->imported) {
|
||||
return { SkipState::Skip };
|
||||
}
|
||||
}
|
||||
|
||||
history->owner().requestNotifySettings(history->peer);
|
||||
if (notifyBy) {
|
||||
history->owner().requestNotifySettings(notifyBy);
|
||||
}
|
||||
|
||||
const auto scheduled = item->out() && item->isFromScheduled();
|
||||
if (history->owner().notifyMuteUnknown(history->peer)) {
|
||||
return { SkipState::Unknown, item->isSilent() };
|
||||
} else if (!history->owner().notifyIsMuted(history->peer)) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ ENV LibrariesPath /usr/src/Libraries
|
|||
WORKDIR $LibrariesPath
|
||||
|
||||
FROM builder AS patches
|
||||
RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout 01779db1de
|
||||
RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout 9d2a07ba8b
|
||||
|
||||
FROM builder AS extra-cmake-modules
|
||||
|
||||
|
|
|
|||
7
Telegram/build/prepare/linux.sh
Executable file
7
Telegram/build/prepare/linux.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
set -e
|
||||
FullExecPath=$PWD
|
||||
pushd `dirname $0` > /dev/null
|
||||
FullScriptPath=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
./build/docker/centos_env/prepare.sh
|
||||
|
|
@ -379,7 +379,7 @@ def runStages():
|
|||
stage('patches', """
|
||||
git clone https://github.com/desktop-app/patches.git
|
||||
cd patches
|
||||
git checkout 1a1d9e6d2c
|
||||
git checkout 52e847920f
|
||||
""")
|
||||
|
||||
stage('depot_tools', """
|
||||
|
|
@ -396,6 +396,7 @@ depends:patches/gyp.diff
|
|||
git apply $LIBS_DIR/patches/gyp.diff
|
||||
mac:
|
||||
python3 -m pip install git+https://github.com/nodejs/gyp-next@v0.10.0
|
||||
mkdir gyp
|
||||
""", 'ThirdParty')
|
||||
|
||||
stage('yasm', """
|
||||
|
|
@ -498,13 +499,18 @@ mac:
|
|||
""")
|
||||
|
||||
stage('opus', """
|
||||
git clone -b td-v1.3.1 https://github.com/telegramdesktop/opus.git
|
||||
git clone -b v1.3.1 https://github.com/xiph/opus.git
|
||||
cd opus
|
||||
win:
|
||||
cd win32\\VS2015
|
||||
msbuild opus.sln /property:Configuration=Debug /property:Platform="%WIN32X64%"
|
||||
cmake -B out . ^
|
||||
-A %WIN32X64% ^
|
||||
-DCMAKE_INSTALL_PREFIX=%LIBS_DIR%/local/opus ^
|
||||
-DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" ^
|
||||
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG"
|
||||
cmake --build out --config Debug
|
||||
release:
|
||||
msbuild opus.sln /property:Configuration=Release /property:Platform="%WIN32X64%"
|
||||
cmake --build out --config Release
|
||||
cmake --install out --config Release
|
||||
mac:
|
||||
./autogen.sh
|
||||
CFLAGS="$MIN_VER $UNGUARDED" CPPFLAGS="$MIN_VER $UNGUARDED" LDFLAGS="$MIN_VER" ./configure --prefix=$USED_PREFIX
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
AppVersion 3001000
|
||||
AppVersion 3001001
|
||||
AppVersionStrMajor 3.1
|
||||
AppVersionStrSmall 3.1
|
||||
AppVersionStr 3.1.0
|
||||
AppVersionStrSmall 3.1.1
|
||||
AppVersionStr 3.1.1
|
||||
BetaChannel 0
|
||||
AlphaVersion 0
|
||||
AppVersionOriginal 3.1
|
||||
AppVersionOriginal 3.1.1
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 6fe29a2dfe8904559d31e3c9df5d51e9ed123011
|
||||
Subproject commit d134c0361ef96b5061c2719a0e984eaaed2c1a81
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit eb86d2dc51aedc0a53188f1f2beb932e19442f9b
|
||||
Subproject commit 300dd975a5411cf5cf066f6303cabd1ba044b1d5
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
3.1.1 (24.09.21)
|
||||
|
||||
- Crash fixes.
|
||||
|
||||
3.1 (19.09.21)
|
||||
|
||||
- Some animated emoji now have extra effects.
|
||||
|
|
|
|||
2
cmake
2
cmake
|
|
@ -1 +1 @@
|
|||
Subproject commit dfd1ab4b4959b943bb0236046d8f89bdacaaa266
|
||||
Subproject commit f8a594be84f598172e9df229e44fe6121cf0a297
|
||||
|
|
@ -42,7 +42,16 @@ apps:
|
|||
slots:
|
||||
- tdesktop-mpris
|
||||
|
||||
hooks:
|
||||
configure:
|
||||
command-chain:
|
||||
- bin/hooks-configure-desktop
|
||||
plugs:
|
||||
- desktop
|
||||
|
||||
plugs:
|
||||
desktop:
|
||||
mount-host-font-cache: false
|
||||
# Support for common GTK themes
|
||||
# https://forum.snapcraft.io/t/how-to-use-the-system-gtk-theme-via-the-gtk-common-themes-snap/6235
|
||||
gsettings:
|
||||
|
|
@ -125,7 +134,7 @@ parts:
|
|||
version="$(git describe --tags | sed -r 's,^k([0-9]\.[0-9]),\1,')"
|
||||
snapcraftctl set-version "$version"
|
||||
|
||||
sed -i 's|^Icon=.*|Icon=${SNAP}/meta/gui/icon.png|g' lib/xdg/kotatogramdesktop.desktop
|
||||
sed -i 's|^Icon=kotatogram$|Icon=${SNAP}/meta/gui/icon.png|g' lib/xdg/telegramdesktop.desktop
|
||||
override-build: |
|
||||
snapcraftctl build
|
||||
rm -rf "$SNAPCRAFT_PART_INSTALL/usr/share/icons"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue