Alpha 1.0.23: Add blocked users list box in settings.

Also fixed build for Xcode.
This commit is contained in:
John Preston 2017-03-15 13:31:36 +03:00
parent 2ce2a14228
commit 8c06b08f30
10 changed files with 67 additions and 33 deletions

View file

@ -9,7 +9,7 @@
<Identity Name="TelegramDesktop" <Identity Name="TelegramDesktop"
ProcessorArchitecture="x64" ProcessorArchitecture="x64"
Publisher="CN=Telegram Messenger LLP, O=Telegram Messenger LLP, L=London, C=GB" Publisher="CN=Telegram Messenger LLP, O=Telegram Messenger LLP, L=London, C=GB"
Version="1.0.22.0" /> Version="1.0.23.0" />
<Properties> <Properties>
<DisplayName>Telegram Desktop</DisplayName> <DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName> <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>

View file

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,22,0 FILEVERSION 1,0,23,0
PRODUCTVERSION 1,0,22,0 PRODUCTVERSION 1,0,23,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -52,10 +52,10 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop" VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "1.0.22.0" VALUE "FileVersion", "1.0.23.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.0.22.0" VALUE "ProductVersion", "1.0.23.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,22,0 FILEVERSION 1,0,23,0
PRODUCTVERSION 1,0,22,0 PRODUCTVERSION 1,0,23,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -43,10 +43,10 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop Updater" VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "1.0.22.0" VALUE "FileVersion", "1.0.23.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.0.22.0" VALUE "ProductVersion", "1.0.23.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -175,9 +175,7 @@ public:
// callback takes two iterators, like [](auto &begin, auto &end). // callback takes two iterators, like [](auto &begin, auto &end).
template <typename ReorderCallback> template <typename ReorderCallback>
void reorderRows(ReorderCallback &&callback) { void reorderRows(ReorderCallback &&callback);
_inner->reorderRows(std::forward<ReorderCallback>(callback));
}
protected: protected:
void prepare() override; void prepare() override;
@ -194,7 +192,6 @@ private:
object_ptr<Ui::WidgetSlideWrap<Ui::MultiSelect>> _select = { nullptr }; object_ptr<Ui::WidgetSlideWrap<Ui::MultiSelect>> _select = { nullptr };
class Inner;
QPointer<Inner> _inner; QPointer<Inner> _inner;
std::unique_ptr<Controller> _controller; std::unique_ptr<Controller> _controller;
@ -262,7 +259,8 @@ private:
void appendGlobalSearchRow(std::unique_ptr<Row> row); void appendGlobalSearchRow(std::unique_ptr<Row> row);
struct RowIndex { struct RowIndex {
RowIndex() = default; RowIndex() {
}
explicit RowIndex(int value) : value(value) { explicit RowIndex(int value) : value(value) {
} }
int value = -1; int value = -1;
@ -275,7 +273,8 @@ private:
} }
struct Selected { struct Selected {
Selected() = default; Selected() {
}
Selected(RowIndex index, bool action) : index(index), action(action) { Selected(RowIndex index, bool action) : index(index), action(action) {
} }
Selected(int index, bool action) : index(index), action(action) { Selected(int index, bool action) : index(index), action(action) {
@ -363,3 +362,8 @@ private:
std::map<mtpRequestId, QString> _globalSearchQueries; std::map<mtpRequestId, QString> _globalSearchQueries;
}; };
template <typename ReorderCallback>
inline void PeerListBox::reorderRows(ReorderCallback &&callback) {
_inner->reorderRows(std::forward<ReorderCallback>(callback));
}

View file

@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#define BETA_VERSION_MACRO (0ULL) #define BETA_VERSION_MACRO (0ULL)
constexpr int AppVersion = 1000022; constexpr int AppVersion = 1000023;
constexpr str_const AppVersionStr = "1.0.22"; constexpr str_const AppVersionStr = "1.0.23";
constexpr bool AppAlphaVersion = true; constexpr bool AppAlphaVersion = true;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;

View file

@ -638,7 +638,7 @@ void Messenger::checkMapVersion() {
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000021) { if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000021) {
versionFeatures = QString::fromUtf8("\xE2\x80\x94 Send MP4/MOV files as videos that will play right inside Telegram.\n\xE2\x80\x94 Bug fixes and other minor improvements."); versionFeatures = QString::fromUtf8("\xE2\x80\x94 Edit list of blocked users in Settings.");
} else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000012) { } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000012) {
versionFeatures = langNewVersionText(); versionFeatures = langNewVersionText();
} else { } else {

View file

@ -209,7 +209,7 @@ void BlockUserBoxController::rebuildRows() {
auto added = appendList(App::main()->dialogsList()); auto added = appendList(App::main()->dialogsList());
added += appendList(App::main()->contactsNoDialogsList()); added += appendList(App::main()->contactsNoDialogsList());
if (!wasEmpty && added > 0) { if (!wasEmpty && added > 0) {
view()->reorderRows([](auto &begin, auto &end) { view()->reorderRows([](auto &&begin, auto &&end) {
// Place dialogs list before contactsNoDialogs list. // Place dialogs list before contactsNoDialogs list.
std::stable_partition(begin, end, [](auto &row) { std::stable_partition(begin, end, [](auto &row) {
auto history = static_cast<Row&>(*row).history(); auto history = static_cast<Row&>(*row).history();

View file

@ -98,6 +98,7 @@ elif [ "$BuildTarget" == "mac" ]; then
DropboxDeployPath="$DropboxPath/$AppVersionStrFull" DropboxDeployPath="$DropboxPath/$AppVersionStrFull"
DropboxSetupFile="$SetupFile" DropboxSetupFile="$SetupFile"
DropboxMac32SetupFile="$Mac32SetupFile" DropboxMac32SetupFile="$Mac32SetupFile"
BackupPath="/Volumes/Storage/backup/$AppVersionStrMajor/$AppVersionStrFull"
elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then
Error "No need to deploy this target." Error "No need to deploy this target."
else else
@ -134,6 +135,11 @@ if [ "$BetaVersion" != "0" ]; then
WinUpdateFile="${WinUpdateFile}_${BetaSignature}" WinUpdateFile="${WinUpdateFile}_${BetaSignature}"
WinPortableFile="tbeta${BetaVersion}_${BetaSignature}.zip" WinPortableFile="tbeta${BetaVersion}_${BetaSignature}.zip"
fi fi
elif [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
BackupPath="/media/psf/backup/$AppVersionStrMajor/$AppVersionStrFull/t$BuildTarget"
if [ ! -d "/media/psf/backup" ]; then
Error "Backup folder not found!"
fi
fi fi
#if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then #if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
@ -183,6 +189,12 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build
if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then
rsync -av --progress "$DeployPath/$UpdateFile" "$DeployPath/$SetupFile" "tmaster:tdesktop/www/$RemoteFolder/" rsync -av --progress "$DeployPath/$UpdateFile" "$DeployPath/$SetupFile" "tmaster:tdesktop/www/$RemoteFolder/"
fi fi
if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
if [ "$BetaVersion" == "0" ]; then
mkdir -p "$BackupPath"
cp "$DeployPath/$SetupFile" "$BackupPath"
fi
fi
if [ "$BuildTarget" == "mac" ]; then if [ "$BuildTarget" == "mac" ]; then
if [ "$DeployMac32" == "1" ]; then if [ "$DeployMac32" == "1" ]; then
rsync -av --progress "$Mac32DeployPath/$Mac32UpdateFile" "$Mac32DeployPath/$Mac32SetupFile" "tmaster:tdesktop/www/$Mac32RemoteFolder/" rsync -av --progress "$Mac32DeployPath/$Mac32UpdateFile" "$Mac32DeployPath/$Mac32SetupFile" "tmaster:tdesktop/www/$Mac32RemoteFolder/"
@ -196,27 +208,41 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build
fi fi
if [ "$DeployMac" == "1" ]; then if [ "$DeployMac" == "1" ]; then
cp -v "$DeployPath/$SetupFile" "$DropboxDeployPath/$DropboxSetupFile"
if [ -d "$DropboxDeployPath/Telegram.app.dSYM" ]; then if [ -d "$DropboxDeployPath/Telegram.app.dSYM" ]; then
rm -rf "$DropboxDeployPath/Telegram.app.dSYM" rm -rf "$DropboxDeployPath/Telegram.app.dSYM"
fi fi
cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/" cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/"
if [ "$BetaVersion" == "0" ]; then
mkdir -p "$BackupPath/tmac"
mv -v "$DeployPath/$SetupFile" "$BackupPath/tmac/"
fi
fi fi
if [ "$DeployMac32" == "1" ]; then if [ "$DeployMac32" == "1" ]; then
mv -v "$Mac32DeployPath/$Mac32SetupFile" "$DropboxDeployPath/$DropboxMac32SetupFile"
if [ -d "$DropboxDeployPath/Telegram32.app.dSYM" ]; then if [ -d "$DropboxDeployPath/Telegram32.app.dSYM" ]; then
rm -rf "$DropboxDeployPath/Telegram32.app.dSYM" rm -rf "$DropboxDeployPath/Telegram32.app.dSYM"
fi fi
mv -v "$Mac32DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/Telegram32.app.dSYM" mv -v "$Mac32DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/Telegram32.app.dSYM"
if [ "$BetaVersion" == "0" ]; then
mkdir -p "$BackupPath/tmac32"
mv -v "$Mac32DeployPath/$Mac32SetupFile" "$BackupPath/tmac32/"
fi
fi fi
if [ "$DeployWin" == "1" ]; then if [ "$DeployWin" == "1" ]; then
mv -v "$WinDeployPath/Telegram.pdb" "$DropboxDeployPath/" if [ -f "$WinDeployPath/Telegram.pdb" ]; then
mv -v "$WinDeployPath/Updater.exe" "$DropboxDeployPath/" mv -v "$WinDeployPath/Telegram.pdb" "$DropboxDeployPath/"
mv -v "$WinDeployPath/Updater.pdb" "$DropboxDeployPath/" elif [ ! -f "$DropboxDeployPath/Telegram.pdb" ]; then
if [ "$BetaVersion" == "0" ]; then echo "Warning: Telegram.pdb not found."
mv -v "$WinDeployPath/$WinSetupFile" "$DropboxDeployPath/" fi
if [ -f "$WinDeployPath/Updater.pdb" ]; then
mv -v "$WinDeployPath/Updater.pdb" "$DropboxDeployPath/"
elif [ ! -f "$DropboxDeployPath/Updater.pdb" ]; then
echo "Warning: Updater.pdb not found."
fi
if [ "$BetaVersion" == "0" ]; then
mkdir -p "$BackupPath/tsetup"
mv -v "$WinDeployPath/$WinSetupFile" "$BackupPath/tsetup/"
mv -v "$WinDeployPath/$WinPortableFile" "$BackupPath/tsetup/"
fi fi
mv -v "$WinDeployPath/$WinPortableFile" "$DropboxDeployPath/"
fi fi
fi fi
fi fi

View file

@ -1,6 +1,6 @@
AppVersion 1000022 AppVersion 1000023
AppVersionStrMajor 1.0 AppVersionStrMajor 1.0
AppVersionStrSmall 1.0.22 AppVersionStrSmall 1.0.23
AppVersionStr 1.0.22 AppVersionStr 1.0.23
AlphaChannel 1 AlphaChannel 1
BetaVersion 0 BetaVersion 0

View file

@ -1,3 +1,7 @@
1.0.23 alpha (15.03.17)
- Edit list of blocked users in Settings.
1.0.22 alpha (13.03.17) 1.0.22 alpha (13.03.17)
- Bug fixes and other minor improvements. - Bug fixes and other minor improvements.
@ -1162,12 +1166,12 @@
- Escape key closes photo view. - Escape key closes photo view.
- On OS X now Ctrl+Tab and Ctrl+Shift+Tab are working for dialogs switching. - On OS X now Ctrl+Tab and Ctrl+Shift+Tab are working for dialogs switching.
- On Linux fixed notifies (they don&#39;t grab focus and aren&#39;t seen in windows switcher), fixed keyboard layout change. - On Linux fixed notifies (they don't grab focus and aren't seen in windows switcher), fixed keyboard layout change.
- On Linux all application data is now stored in ~/.TelegramDesktop directory. - On Linux all application data is now stored in ~/.TelegramDesktop directory.
0.5.9 (18.07.14) 0.5.9 (18.07.14)
- Choose between notification with preview, with only sender&#39;s name (message preview hidden) or without any information. - Choose between notification with preview, with only sender's name (message preview hidden) or without any information.
- Sending documents from "Send to" explorer context menu added, see a checkbox in Settings (only Windows version). - Sending documents from "Send to" explorer context menu added, see a checkbox in Settings (only Windows version).
- Little features: Ctrl+Tab / Ctrl+Shift+Tab switch to near dialogs, links without top-level domain highlight, version in About dialog now leads to version history. - Little features: Ctrl+Tab / Ctrl+Shift+Tab switch to near dialogs, links without top-level domain highlight, version in About dialog now leads to version history.
- Some bugs fixed: maximize button in Ubuntu, running different copies of app under different users at the same time in Windows, Surface touchscreen support fixed. - Some bugs fixed: maximize button in Ubuntu, running different copies of app under different users at the same time in Windows, Surface touchscreen support fixed.
@ -1215,7 +1219,7 @@
0.5.0 (30.05.14) 0.5.0 (30.05.14)
- Application source code is published on <a href="https://github.com/telegramdesktop/tdesktop">GitHub</a> under GPL v3,<br>license is available <a href="https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE">here</a>. - Application source code is published on GitHub under GPL v3
0.4.18 (28.05.14) 0.4.18 (28.05.14)