2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

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

@@ -175,9 +175,7 @@ public:
// callback takes two iterators, like [](auto &begin, auto &end).
template <typename ReorderCallback>
void reorderRows(ReorderCallback &&callback) {
_inner->reorderRows(std::forward<ReorderCallback>(callback));
}
void reorderRows(ReorderCallback &&callback);
protected:
void prepare() override;
@@ -194,7 +192,6 @@ private:
object_ptr<Ui::WidgetSlideWrap<Ui::MultiSelect>> _select = { nullptr };
class Inner;
QPointer<Inner> _inner;
std::unique_ptr<Controller> _controller;
@@ -262,7 +259,8 @@ private:
void appendGlobalSearchRow(std::unique_ptr<Row> row);
struct RowIndex {
RowIndex() = default;
RowIndex() {
}
explicit RowIndex(int value) : value(value) {
}
int value = -1;
@@ -275,7 +273,8 @@ private:
}
struct Selected {
Selected() = default;
Selected() {
}
Selected(RowIndex 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;
};
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)
constexpr int AppVersion = 1000022;
constexpr str_const AppVersionStr = "1.0.22";
constexpr int AppVersion = 1000023;
constexpr str_const AppVersionStr = "1.0.23";
constexpr bool AppAlphaVersion = true;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;

View File

@@ -638,7 +638,7 @@ void Messenger::checkMapVersion() {
if (Local::oldMapVersion()) {
QString versionFeatures;
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) {
versionFeatures = langNewVersionText();
} else {

View File

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