mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Slightly improved code style for long equality expressions.
This commit is contained in:
parent
a37cbd7d05
commit
1c223e570a
48 changed files with 159 additions and 160 deletions
|
@ -112,8 +112,8 @@ void ApplyLastList(
|
||||||
channel->mgInfo->lastAdmins.clear();
|
channel->mgInfo->lastAdmins.clear();
|
||||||
channel->mgInfo->lastRestricted.clear();
|
channel->mgInfo->lastRestricted.clear();
|
||||||
channel->mgInfo->lastParticipants.clear();
|
channel->mgInfo->lastParticipants.clear();
|
||||||
channel->mgInfo->lastParticipantsStatus =
|
channel->mgInfo->lastParticipantsStatus
|
||||||
MegagroupInfo::LastParticipantsUpToDate
|
= MegagroupInfo::LastParticipantsUpToDate
|
||||||
| MegagroupInfo::LastParticipantsOnceReceived;
|
| MegagroupInfo::LastParticipantsOnceReceived;
|
||||||
|
|
||||||
auto botStatus = channel->mgInfo->botStatus;
|
auto botStatus = channel->mgInfo->botStatus;
|
||||||
|
|
|
@ -58,10 +58,10 @@ void HandleWithdrawalButton(
|
||||||
state->loading = false;
|
state->loading = false;
|
||||||
|
|
||||||
auto fields = PasscodeBox::CloudFields::From(pass);
|
auto fields = PasscodeBox::CloudFields::From(pass);
|
||||||
fields.customTitle =
|
fields.customTitle
|
||||||
tr::lng_channel_earn_balance_password_title();
|
= tr::lng_channel_earn_balance_password_title();
|
||||||
fields.customDescription =
|
fields.customDescription
|
||||||
tr::lng_channel_earn_balance_password_description(tr::now);
|
= tr::lng_channel_earn_balance_password_description(tr::now);
|
||||||
fields.customSubmitButton = tr::lng_passcode_submit();
|
fields.customSubmitButton = tr::lng_passcode_submit();
|
||||||
fields.customCheckCallback = crl::guard(button, [=](
|
fields.customCheckCallback = crl::guard(button, [=](
|
||||||
const Core::CloudPasswordResult &result) {
|
const Core::CloudPasswordResult &result) {
|
||||||
|
|
|
@ -29,20 +29,20 @@ namespace {
|
||||||
using namespace rpl::details;
|
using namespace rpl::details;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr auto WithId =
|
constexpr auto WithId
|
||||||
is_callable_plain_v<T, Fn<void()>, mtpRequestId>;
|
= is_callable_plain_v<T, Fn<void()>, mtpRequestId>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr auto WithoutId =
|
constexpr auto WithoutId
|
||||||
is_callable_plain_v<T, Fn<void()>>;
|
= is_callable_plain_v<T, Fn<void()>>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr auto WithoutCallback =
|
constexpr auto WithoutCallback
|
||||||
is_callable_plain_v<T>;
|
= is_callable_plain_v<T>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr auto ErrorWithId =
|
constexpr auto ErrorWithId
|
||||||
is_callable_plain_v<T, QString, mtpRequestId>;
|
= is_callable_plain_v<T, QString, mtpRequestId>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr auto ErrorWithoutId =
|
constexpr auto ErrorWithoutId
|
||||||
is_callable_plain_v<T, QString>;
|
= is_callable_plain_v<T, QString>;
|
||||||
|
|
||||||
template <typename DoneCallback, typename FailCallback>
|
template <typename DoneCallback, typename FailCallback>
|
||||||
mtpRequestId EditMessage(
|
mtpRequestId EditMessage(
|
||||||
|
|
|
@ -307,8 +307,8 @@ void UserPrivacy::reload(Key key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserPrivacy::pushPrivacy(Key key, const TLRules &rules) {
|
void UserPrivacy::pushPrivacy(Key key, const TLRules &rules) {
|
||||||
const auto &saved = (_privacyValues[key] =
|
const auto &saved
|
||||||
TLToRules(rules, _session->data()));
|
= (_privacyValues[key] = TLToRules(rules, _session->data()));
|
||||||
const auto i = _privacyChanges.find(key);
|
const auto i = _privacyChanges.find(key);
|
||||||
if (i != end(_privacyChanges)) {
|
if (i != end(_privacyChanges)) {
|
||||||
i->second.fire_copy(saved);
|
i->second.fire_copy(saved);
|
||||||
|
|
|
@ -1544,8 +1544,8 @@ void ApiWrap::saveStickerSets(
|
||||||
writeRecent = true;
|
writeRecent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto isAttached =
|
const auto isAttached
|
||||||
(removedSetId == Data::Stickers::CloudRecentAttachedSetId);
|
= (removedSetId == Data::Stickers::CloudRecentAttachedSetId);
|
||||||
const auto flags = isAttached
|
const auto flags = isAttached
|
||||||
? MTPmessages_ClearRecentStickers::Flag::f_attached
|
? MTPmessages_ClearRecentStickers::Flag::f_attached
|
||||||
: MTPmessages_ClearRecentStickers::Flags(0);
|
: MTPmessages_ClearRecentStickers::Flags(0);
|
||||||
|
@ -2494,8 +2494,8 @@ void ApiWrap::refreshFileReference(
|
||||||
}, [&](Data::FileOriginPeerPhoto data) {
|
}, [&](Data::FileOriginPeerPhoto data) {
|
||||||
fail();
|
fail();
|
||||||
}, [&](Data::FileOriginStickerSet data) {
|
}, [&](Data::FileOriginStickerSet data) {
|
||||||
const auto isRecentAttached =
|
const auto isRecentAttached
|
||||||
(data.setId == Data::Stickers::CloudRecentAttachedSetId);
|
= (data.setId == Data::Stickers::CloudRecentAttachedSetId);
|
||||||
if (data.setId == Data::Stickers::CloudRecentSetId
|
if (data.setId == Data::Stickers::CloudRecentSetId
|
||||||
|| data.setId == Data::Stickers::RecentSetId
|
|| data.setId == Data::Stickers::RecentSetId
|
||||||
|| isRecentAttached) {
|
|| isRecentAttached) {
|
||||||
|
|
|
@ -605,8 +605,8 @@ void GroupInfoBox::prepare() {
|
||||||
_navigation->session().api().selfDestruct().reload();
|
_navigation->session().api().selfDestruct().reload();
|
||||||
|
|
||||||
const auto top = addTopButton(st::infoTopBarMenu);
|
const auto top = addTopButton(st::infoTopBarMenu);
|
||||||
const auto menu =
|
const auto menu
|
||||||
top->lifetime().make_state<base::unique_qptr<Ui::PopupMenu>>();
|
= top->lifetime().make_state<base::unique_qptr<Ui::PopupMenu>>();
|
||||||
top->setClickedCallback([=] {
|
top->setClickedCallback([=] {
|
||||||
*menu = base::make_unique_q<Ui::PopupMenu>(
|
*menu = base::make_unique_q<Ui::PopupMenu>(
|
||||||
top,
|
top,
|
||||||
|
@ -1306,8 +1306,8 @@ void SetupChannelBox::handleChange() {
|
||||||
&& (ch < 'a' || ch > 'z')
|
&& (ch < 'a' || ch > 'z')
|
||||||
&& (ch < '0' || ch > '9')
|
&& (ch < '0' || ch > '9')
|
||||||
&& ch != '_') {
|
&& ch != '_') {
|
||||||
const auto badSymbols =
|
const auto badSymbols
|
||||||
tr::lng_create_channel_link_bad_symbols(tr::now);
|
= tr::lng_create_channel_link_bad_symbols(tr::now);
|
||||||
if (_errorText != badSymbols) {
|
if (_errorText != badSymbols) {
|
||||||
_errorText = badSymbols;
|
_errorText = badSymbols;
|
||||||
update();
|
update();
|
||||||
|
@ -1317,8 +1317,8 @@ void SetupChannelBox::handleChange() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (name.size() < Ui::EditPeer::kMinUsernameLength) {
|
if (name.size() < Ui::EditPeer::kMinUsernameLength) {
|
||||||
const auto tooShort =
|
const auto tooShort
|
||||||
tr::lng_create_channel_link_too_short(tr::now);
|
= tr::lng_create_channel_link_too_short(tr::now);
|
||||||
if (_errorText != tooShort) {
|
if (_errorText != tooShort) {
|
||||||
_errorText = tooShort;
|
_errorText = tooShort;
|
||||||
update();
|
update();
|
||||||
|
|
|
@ -232,8 +232,8 @@ void DeleteMessagesBox::prepare() {
|
||||||
if (hasScheduledMessages()) {
|
if (hasScheduledMessages()) {
|
||||||
} else if (auto revoke = revokeText(peer)) {
|
} else if (auto revoke = revokeText(peer)) {
|
||||||
const auto &settings = Core::App().settings();
|
const auto &settings = Core::App().settings();
|
||||||
const auto revokeByDefault =
|
const auto revokeByDefault
|
||||||
!settings.rememberedDeleteMessageOnlyForYou();
|
= !settings.rememberedDeleteMessageOnlyForYou();
|
||||||
_revoke.create(
|
_revoke.create(
|
||||||
this,
|
this,
|
||||||
revoke->checkbox,
|
revoke->checkbox,
|
||||||
|
|
|
@ -983,8 +983,8 @@ void Controller::fillHistoryVisibilityButton() {
|
||||||
: HistoryVisibility::Visible;
|
: HistoryVisibility::Visible;
|
||||||
_channelHasLocationOriginalValue = channel && channel->hasLocation();
|
_channelHasLocationOriginalValue = channel && channel->hasLocation();
|
||||||
|
|
||||||
const auto updateHistoryVisibility =
|
const auto updateHistoryVisibility
|
||||||
std::make_shared<rpl::event_stream<HistoryVisibility>>();
|
= std::make_shared<rpl::event_stream<HistoryVisibility>>();
|
||||||
|
|
||||||
const auto boxCallback = crl::guard(this, [=](HistoryVisibility checked) {
|
const auto boxCallback = crl::guard(this, [=](HistoryVisibility checked) {
|
||||||
updateHistoryVisibility->fire(std::move(checked));
|
updateHistoryVisibility->fire(std::move(checked));
|
||||||
|
@ -1698,8 +1698,8 @@ void Controller::saveUsernamesOrder() {
|
||||||
channel->setUsernames(ranges::views::all(
|
channel->setUsernames(ranges::views::all(
|
||||||
newUsernames
|
newUsernames
|
||||||
) | ranges::views::transform([&](QString username) {
|
) | ranges::views::transform([&](QString username) {
|
||||||
const auto editable =
|
const auto editable
|
||||||
(channel->editableUsername() == username);
|
= (channel->editableUsername() == username);
|
||||||
return Data::Username{
|
return Data::Username{
|
||||||
.username = std::move(username),
|
.username = std::move(username),
|
||||||
.active = true,
|
.active = true,
|
||||||
|
|
|
@ -1240,8 +1240,8 @@ void DecorateListPromoBox(
|
||||||
box->setStyle(st::premiumPreviewDoubledLimitsBox);
|
box->setStyle(st::premiumPreviewDoubledLimitsBox);
|
||||||
box->widthValue(
|
box->widthValue(
|
||||||
) | rpl::start_with_next([=](int width) {
|
) | rpl::start_with_next([=](int width) {
|
||||||
const auto &padding =
|
const auto &padding
|
||||||
st::premiumPreviewDoubledLimitsBox.buttonPadding;
|
= st::premiumPreviewDoubledLimitsBox.buttonPadding;
|
||||||
button->resizeToWidth(width
|
button->resizeToWidth(width
|
||||||
- padding.left()
|
- padding.left()
|
||||||
- padding.right());
|
- padding.right());
|
||||||
|
|
|
@ -569,8 +569,8 @@ void StickerSetBox::updateButtons() {
|
||||||
|
|
||||||
if (!_inner->shortName().isEmpty()) {
|
if (!_inner->shortName().isEmpty()) {
|
||||||
const auto top = addTopButton(st::infoTopBarMenu);
|
const auto top = addTopButton(st::infoTopBarMenu);
|
||||||
const auto menu =
|
const auto menu
|
||||||
std::make_shared<base::unique_qptr<Ui::PopupMenu>>();
|
= std::make_shared<base::unique_qptr<Ui::PopupMenu>>();
|
||||||
top->setClickedCallback([=] {
|
top->setClickedCallback([=] {
|
||||||
*menu = base::make_unique_q<Ui::PopupMenu>(
|
*menu = base::make_unique_q<Ui::PopupMenu>(
|
||||||
top,
|
top,
|
||||||
|
@ -613,8 +613,8 @@ void StickerSetBox::updateButtons() {
|
||||||
_show->showBox(std::move(box));
|
_show->showBox(std::move(box));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const auto menu =
|
const auto menu
|
||||||
std::make_shared<base::unique_qptr<Ui::PopupMenu>>();
|
= std::make_shared<base::unique_qptr<Ui::PopupMenu>>();
|
||||||
top->setClickedCallback([=] {
|
top->setClickedCallback([=] {
|
||||||
*menu = base::make_unique_q<Ui::PopupMenu>(
|
*menu = base::make_unique_q<Ui::PopupMenu>(
|
||||||
top,
|
top,
|
||||||
|
|
|
@ -945,8 +945,8 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
||||||
tgcalls::Descriptor descriptor = {
|
tgcalls::Descriptor descriptor = {
|
||||||
.version = versionString,
|
.version = versionString,
|
||||||
.config = tgcalls::Config{
|
.config = tgcalls::Config{
|
||||||
.initializationTimeout =
|
.initializationTimeout
|
||||||
serverConfig.callConnectTimeoutMs / 1000.,
|
= serverConfig.callConnectTimeoutMs / 1000.,
|
||||||
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,
|
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,
|
||||||
.dataSaving = tgcalls::DataSaving::Never,
|
.dataSaving = tgcalls::DataSaving::Never,
|
||||||
.enableP2P = call.is_p2p_allowed(),
|
.enableP2P = call.is_p2p_allowed(),
|
||||||
|
|
|
@ -277,11 +277,11 @@ private:
|
||||||
MTP::Sender _api;
|
MTP::Sender _api;
|
||||||
Type _type = Type::Outgoing;
|
Type _type = Type::Outgoing;
|
||||||
rpl::variable<State> _state = State::Starting;
|
rpl::variable<State> _state = State::Starting;
|
||||||
rpl::variable<RemoteAudioState> _remoteAudioState =
|
rpl::variable<RemoteAudioState> _remoteAudioState
|
||||||
RemoteAudioState::Active;
|
= RemoteAudioState::Active;
|
||||||
rpl::variable<Webrtc::VideoState> _remoteVideoState;
|
rpl::variable<Webrtc::VideoState> _remoteVideoState;
|
||||||
rpl::variable<RemoteBatteryState> _remoteBatteryState =
|
rpl::variable<RemoteBatteryState> _remoteBatteryState
|
||||||
RemoteBatteryState::Normal;
|
= RemoteBatteryState::Normal;
|
||||||
rpl::event_stream<Error> _errors;
|
rpl::event_stream<Error> _errors;
|
||||||
FinishType _finishAfterRequestingCall = FinishType::None;
|
FinishType _finishAfterRequestingCall = FinishType::None;
|
||||||
bool _answerAfterDhConfigReceived = false;
|
bool _answerAfterDhConfigReceived = false;
|
||||||
|
|
|
@ -162,8 +162,8 @@ private:
|
||||||
object_ptr<Ui::FlatLabel> _status;
|
object_ptr<Ui::FlatLabel> _status;
|
||||||
object_ptr<Ui::RpWidget> _fingerprint = { nullptr };
|
object_ptr<Ui::RpWidget> _fingerprint = { nullptr };
|
||||||
object_ptr<Ui::PaddingWrap<Ui::FlatLabel>> _remoteAudioMute = { nullptr };
|
object_ptr<Ui::PaddingWrap<Ui::FlatLabel>> _remoteAudioMute = { nullptr };
|
||||||
object_ptr<Ui::PaddingWrap<Ui::FlatLabel>> _remoteLowBattery =
|
object_ptr<Ui::PaddingWrap<Ui::FlatLabel>> _remoteLowBattery
|
||||||
{ nullptr };
|
= { nullptr };
|
||||||
std::unique_ptr<Userpic> _userpic;
|
std::unique_ptr<Userpic> _userpic;
|
||||||
std::unique_ptr<VideoBubble> _outgoingVideoBubble;
|
std::unique_ptr<VideoBubble> _outgoingVideoBubble;
|
||||||
QPixmap _bottomShadow;
|
QPixmap _bottomShadow;
|
||||||
|
|
|
@ -25,8 +25,8 @@ const auto kSpeakerThreshold = std::vector<float>{
|
||||||
50.0f / kMaxVolumePercent,
|
50.0f / kMaxVolumePercent,
|
||||||
150.0f / kMaxVolumePercent };
|
150.0f / kMaxVolumePercent };
|
||||||
|
|
||||||
constexpr auto kVolumeStickedValues =
|
constexpr auto kVolumeStickedValues
|
||||||
std::array<std::pair<float64, float64>, 7>{{
|
= std::array<std::pair<float64, float64>, 7>{{
|
||||||
{ 25. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
{ 25. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
||||||
{ 50. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
{ 50. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
||||||
{ 75. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
{ 75. / kMaxVolumePercent, 2. / kMaxVolumePercent },
|
||||||
|
@ -93,8 +93,8 @@ MenuVolumeItem::MenuVolumeItem(
|
||||||
const auto volume = _localMuted
|
const auto volume = _localMuted
|
||||||
? 0
|
? 0
|
||||||
: base::SafeRound(_slider->value() * kMaxVolumePercent);
|
: base::SafeRound(_slider->value() * kMaxVolumePercent);
|
||||||
const auto muteProgress =
|
const auto muteProgress
|
||||||
_crossLineAnimation.value((!volume) ? 1. : 0.);
|
= _crossLineAnimation.value((!volume) ? 1. : 0.);
|
||||||
|
|
||||||
const auto selected = isSelected();
|
const auto selected = isSelected();
|
||||||
p.fillRect(clip, selected ? st.itemBgOver : st.itemBg);
|
p.fillRect(clip, selected ? st.itemBgOver : st.itemBg);
|
||||||
|
@ -174,8 +174,8 @@ MenuVolumeItem::MenuVolumeItem(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_waitingForUpdateVolume) {
|
if (_waitingForUpdateVolume) {
|
||||||
const auto localVolume =
|
const auto localVolume
|
||||||
base::SafeRound(_slider->value() * _maxVolume);
|
= base::SafeRound(_slider->value() * _maxVolume);
|
||||||
if ((localVolume != newVolume)
|
if ((localVolume != newVolume)
|
||||||
&& (_cloudVolume == newVolume)) {
|
&& (_cloudVolume == newVolume)) {
|
||||||
_changeVolumeRequests.fire(int(localVolume));
|
_changeVolumeRequests.fire(int(localVolume));
|
||||||
|
|
|
@ -437,8 +437,8 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
|
||||||
|
|
||||||
auto filterNotPassedByUsername = [this](UserData *user) -> bool {
|
auto filterNotPassedByUsername = [this](UserData *user) -> bool {
|
||||||
if (PrimaryUsername(user).startsWith(_filter, Qt::CaseInsensitive)) {
|
if (PrimaryUsername(user).startsWith(_filter, Qt::CaseInsensitive)) {
|
||||||
const auto exactUsername =
|
const auto exactUsername
|
||||||
(PrimaryUsername(user).size() == _filter.size());
|
= (PrimaryUsername(user).size() == _filter.size());
|
||||||
return exactUsername;
|
return exactUsername;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -446,8 +446,9 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
|
||||||
auto filterNotPassedByName = [&](UserData *user) -> bool {
|
auto filterNotPassedByName = [&](UserData *user) -> bool {
|
||||||
for (const auto &nameWord : user->nameWords()) {
|
for (const auto &nameWord : user->nameWords()) {
|
||||||
if (nameWord.startsWith(_filter, Qt::CaseInsensitive)) {
|
if (nameWord.startsWith(_filter, Qt::CaseInsensitive)) {
|
||||||
const auto exactUsername =
|
const auto exactUsername = PrimaryUsername(user).compare(
|
||||||
(PrimaryUsername(user).compare(_filter, Qt::CaseInsensitive) == 0);
|
_filter,
|
||||||
|
Qt::CaseInsensitive) == 0;
|
||||||
return exactUsername;
|
return exactUsername;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -933,8 +933,8 @@ void Application::handleAppDeactivated() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rpl::producer<bool> Application::appDeactivatedValue() const {
|
rpl::producer<bool> Application::appDeactivatedValue() const {
|
||||||
const auto &app =
|
const auto &app
|
||||||
static_cast<QGuiApplication*>(QCoreApplication::instance());
|
= static_cast<QGuiApplication*>(QCoreApplication::instance());
|
||||||
return rpl::single(
|
return rpl::single(
|
||||||
app->applicationState()
|
app->applicationState()
|
||||||
) | rpl::then(
|
) | rpl::then(
|
||||||
|
|
|
@ -313,8 +313,8 @@ CloudPasswordState ParseCloudPasswordState(
|
||||||
ParseCloudPasswordAlgo(data.vnew_algo()));
|
ParseCloudPasswordAlgo(data.vnew_algo()));
|
||||||
result.mtp.newSecureSecret = ValidateNewSecureSecretAlgo(
|
result.mtp.newSecureSecret = ValidateNewSecureSecretAlgo(
|
||||||
ParseSecureSecretAlgo(data.vnew_secure_algo()));
|
ParseSecureSecretAlgo(data.vnew_secure_algo()));
|
||||||
result.unconfirmedPattern =
|
result.unconfirmedPattern = qs(
|
||||||
qs(data.vemail_unconfirmed_pattern().value_or_empty());
|
data.vemail_unconfirmed_pattern().value_or_empty());
|
||||||
result.pendingResetDate = data.vpending_reset_date().value_or_empty();
|
result.pendingResetDate = data.vpending_reset_date().value_or_empty();
|
||||||
|
|
||||||
result.outdatedClient = [&] {
|
result.outdatedClient = [&] {
|
||||||
|
|
|
@ -984,8 +984,8 @@ private:
|
||||||
#else // Q_OS_MAC
|
#else // Q_OS_MAC
|
||||||
bool _hardwareAcceleratedVideo = false;
|
bool _hardwareAcceleratedVideo = false;
|
||||||
#endif // Q_OS_MAC
|
#endif // Q_OS_MAC
|
||||||
HistoryView::DoubleClickQuickAction _chatQuickAction =
|
HistoryView::DoubleClickQuickAction _chatQuickAction
|
||||||
HistoryView::DoubleClickQuickAction();
|
= HistoryView::DoubleClickQuickAction();
|
||||||
bool _translateButtonEnabled = false;
|
bool _translateButtonEnabled = false;
|
||||||
rpl::variable<bool> _translateChatEnabled = true;
|
rpl::variable<bool> _translateChatEnabled = true;
|
||||||
rpl::variable<int> _translateToRaw = 0;
|
rpl::variable<int> _translateToRaw = 0;
|
||||||
|
|
|
@ -121,8 +121,8 @@ bool PollData::applyResults(const MTPPollResults &results) {
|
||||||
return results.match([&](const MTPDpollResults &results) {
|
return results.match([&](const MTPDpollResults &results) {
|
||||||
_lastResultsUpdate = crl::now();
|
_lastResultsUpdate = crl::now();
|
||||||
|
|
||||||
const auto newTotalVoters =
|
const auto newTotalVoters
|
||||||
results.vtotal_voters().value_or(totalVoters);
|
= results.vtotal_voters().value_or(totalVoters);
|
||||||
auto changed = (newTotalVoters != totalVoters);
|
auto changed = (newTotalVoters != totalVoters);
|
||||||
if (const auto list = results.vresults()) {
|
if (const auto list = results.vresults()) {
|
||||||
for (const auto &result : list->v) {
|
for (const auto &result : list->v) {
|
||||||
|
|
|
@ -37,8 +37,8 @@ struct StatisticalChart {
|
||||||
QString idString;
|
QString idString;
|
||||||
QString name;
|
QString name;
|
||||||
Statistic::ChartValue maxValue = 0;
|
Statistic::ChartValue maxValue = 0;
|
||||||
Statistic::ChartValue minValue =
|
Statistic::ChartValue minValue
|
||||||
std::numeric_limits<Statistic::ChartValue>::max();
|
= std::numeric_limits<Statistic::ChartValue>::max();
|
||||||
QString colorKey;
|
QString colorKey;
|
||||||
QColor color;
|
QColor color;
|
||||||
QColor colorDark;
|
QColor colorDark;
|
||||||
|
@ -57,8 +57,8 @@ struct StatisticalChart {
|
||||||
} defaultZoomXIndex;
|
} defaultZoomXIndex;
|
||||||
|
|
||||||
Statistic::ChartValue maxValue = 0;
|
Statistic::ChartValue maxValue = 0;
|
||||||
Statistic::ChartValue minValue =
|
Statistic::ChartValue minValue
|
||||||
std::numeric_limits<Statistic::ChartValue>::max();
|
= std::numeric_limits<Statistic::ChartValue>::max();
|
||||||
|
|
||||||
float64 oneDayPercentage = 0.;
|
float64 oneDayPercentage = 0.;
|
||||||
|
|
||||||
|
|
|
@ -770,8 +770,8 @@ void Widget::updateScrollUpPosition() {
|
||||||
_scrollToTop->moveToRight(
|
_scrollToTop->moveToRight(
|
||||||
st::historyToDownPosition.x(),
|
st::historyToDownPosition.x(),
|
||||||
_scroll->height() - top);
|
_scroll->height() - top);
|
||||||
const auto shouldBeHidden =
|
const auto shouldBeHidden
|
||||||
!_scrollToTopIsShown && !_scrollToTopShown.animating();
|
= !_scrollToTopIsShown && !_scrollToTopShown.animating();
|
||||||
if (shouldBeHidden != _scrollToTop->isHidden()) {
|
if (shouldBeHidden != _scrollToTop->isHidden()) {
|
||||||
_scrollToTop->setVisible(!shouldBeHidden);
|
_scrollToTop->setVisible(!shouldBeHidden);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ PhotoEditorContent::PhotoEditorContent(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto imageSizeF = [&] {
|
const auto imageSizeF = [&] {
|
||||||
const auto rotatedSize =
|
const auto rotatedSize
|
||||||
FlipSizeByRotation(size, mods.angle);
|
= FlipSizeByRotation(size, mods.angle);
|
||||||
const auto m = _crop->cropMargins();
|
const auto m = _crop->cropMargins();
|
||||||
const auto sizeForCrop = rotatedSize
|
const auto sizeForCrop = rotatedSize
|
||||||
- QSize(m.left() + m.right(), m.top() + m.bottom());
|
- QSize(m.left() + m.right(), m.top() + m.bottom());
|
||||||
|
|
|
@ -541,8 +541,8 @@ void ApiWrap::requestDialogsCount() {
|
||||||
Expects(_startProcess != nullptr);
|
Expects(_startProcess != nullptr);
|
||||||
|
|
||||||
if (_settings->onlySinglePeer()) {
|
if (_settings->onlySinglePeer()) {
|
||||||
_startProcess->info.dialogsCount =
|
_startProcess->info.dialogsCount
|
||||||
(_settings->singlePeer.type() == mtpc_inputPeerChannel
|
= (_settings->singlePeer.type() == mtpc_inputPeerChannel
|
||||||
? 1
|
? 1
|
||||||
: _splits.size());
|
: _splits.size());
|
||||||
sendNextStartRequest();
|
sendNextStartRequest();
|
||||||
|
|
|
@ -738,8 +738,8 @@ void GenerateItems(
|
||||||
using LogPromote = MTPDchannelAdminLogEventActionParticipantToggleAdmin;
|
using LogPromote = MTPDchannelAdminLogEventActionParticipantToggleAdmin;
|
||||||
using LogSticker = MTPDchannelAdminLogEventActionChangeStickerSet;
|
using LogSticker = MTPDchannelAdminLogEventActionChangeStickerSet;
|
||||||
using LogEmoji = MTPDchannelAdminLogEventActionChangeEmojiStickerSet;
|
using LogEmoji = MTPDchannelAdminLogEventActionChangeEmojiStickerSet;
|
||||||
using LogPreHistory =
|
using LogPreHistory
|
||||||
MTPDchannelAdminLogEventActionTogglePreHistoryHidden;
|
= MTPDchannelAdminLogEventActionTogglePreHistoryHidden;
|
||||||
using LogPermissions = MTPDchannelAdminLogEventActionDefaultBannedRights;
|
using LogPermissions = MTPDchannelAdminLogEventActionDefaultBannedRights;
|
||||||
using LogPoll = MTPDchannelAdminLogEventActionStopPoll;
|
using LogPoll = MTPDchannelAdminLogEventActionStopPoll;
|
||||||
using LogDiscussion = MTPDchannelAdminLogEventActionChangeLinkedChat;
|
using LogDiscussion = MTPDchannelAdminLogEventActionChangeLinkedChat;
|
||||||
|
@ -749,19 +749,19 @@ void GenerateItems(
|
||||||
using LogDiscardCall = MTPDchannelAdminLogEventActionDiscardGroupCall;
|
using LogDiscardCall = MTPDchannelAdminLogEventActionDiscardGroupCall;
|
||||||
using LogMute = MTPDchannelAdminLogEventActionParticipantMute;
|
using LogMute = MTPDchannelAdminLogEventActionParticipantMute;
|
||||||
using LogUnmute = MTPDchannelAdminLogEventActionParticipantUnmute;
|
using LogUnmute = MTPDchannelAdminLogEventActionParticipantUnmute;
|
||||||
using LogCallSetting =
|
using LogCallSetting
|
||||||
MTPDchannelAdminLogEventActionToggleGroupCallSetting;
|
= MTPDchannelAdminLogEventActionToggleGroupCallSetting;
|
||||||
using LogJoinByInvite =
|
using LogJoinByInvite
|
||||||
MTPDchannelAdminLogEventActionParticipantJoinByInvite;
|
= MTPDchannelAdminLogEventActionParticipantJoinByInvite;
|
||||||
using LogInviteDelete =
|
using LogInviteDelete
|
||||||
MTPDchannelAdminLogEventActionExportedInviteDelete;
|
= MTPDchannelAdminLogEventActionExportedInviteDelete;
|
||||||
using LogInviteRevoke =
|
using LogInviteRevoke
|
||||||
MTPDchannelAdminLogEventActionExportedInviteRevoke;
|
= MTPDchannelAdminLogEventActionExportedInviteRevoke;
|
||||||
using LogInviteEdit = MTPDchannelAdminLogEventActionExportedInviteEdit;
|
using LogInviteEdit = MTPDchannelAdminLogEventActionExportedInviteEdit;
|
||||||
using LogVolume = MTPDchannelAdminLogEventActionParticipantVolume;
|
using LogVolume = MTPDchannelAdminLogEventActionParticipantVolume;
|
||||||
using LogTTL = MTPDchannelAdminLogEventActionChangeHistoryTTL;
|
using LogTTL = MTPDchannelAdminLogEventActionChangeHistoryTTL;
|
||||||
using LogJoinByRequest =
|
using LogJoinByRequest
|
||||||
MTPDchannelAdminLogEventActionParticipantJoinByRequest;
|
= MTPDchannelAdminLogEventActionParticipantJoinByRequest;
|
||||||
using LogNoForwards = MTPDchannelAdminLogEventActionToggleNoForwards;
|
using LogNoForwards = MTPDchannelAdminLogEventActionToggleNoForwards;
|
||||||
using LogSendMessage = MTPDchannelAdminLogEventActionSendMessage;
|
using LogSendMessage = MTPDchannelAdminLogEventActionSendMessage;
|
||||||
using LogChangeAvailableReactions = MTPDchannelAdminLogEventActionChangeAvailableReactions;
|
using LogChangeAvailableReactions = MTPDchannelAdminLogEventActionChangeAvailableReactions;
|
||||||
|
|
|
@ -52,8 +52,8 @@ DragArea::Areas DragArea::SetupDragAreaToContainer(
|
||||||
auto &lifetime = container->lifetime();
|
auto &lifetime = container->lifetime();
|
||||||
container->setAcceptDrops(true);
|
container->setAcceptDrops(true);
|
||||||
|
|
||||||
const auto attachDragDocument =
|
const auto attachDragDocument
|
||||||
Ui::CreateChild<DragArea>(container.get());
|
= Ui::CreateChild<DragArea>(container.get());
|
||||||
const auto attachDragPhoto = Ui::CreateChild<DragArea>(container.get());
|
const auto attachDragPhoto = Ui::CreateChild<DragArea>(container.get());
|
||||||
|
|
||||||
attachDragDocument->hide();
|
attachDragDocument->hide();
|
||||||
|
@ -62,8 +62,8 @@ DragArea::Areas DragArea::SetupDragAreaToContainer(
|
||||||
attachDragDocument->raise();
|
attachDragDocument->raise();
|
||||||
attachDragPhoto->raise();
|
attachDragPhoto->raise();
|
||||||
|
|
||||||
const auto attachDragState =
|
const auto attachDragState
|
||||||
lifetime.make_state<DragState>(DragState::None);
|
= lifetime.make_state<DragState>(DragState::None);
|
||||||
|
|
||||||
const auto width = [=] {
|
const auto width = [=] {
|
||||||
return container->width();
|
return container->width();
|
||||||
|
|
|
@ -23,8 +23,8 @@ public:
|
||||||
DragArea *photo;
|
DragArea *photo;
|
||||||
};
|
};
|
||||||
|
|
||||||
using CallbackComputeState =
|
using CallbackComputeState
|
||||||
Fn<Storage::MimeDataState(const QMimeData *data)>;
|
= Fn<Storage::MimeDataState(const QMimeData *data)>;
|
||||||
|
|
||||||
static Areas SetupDragAreaToContainer(
|
static Areas SetupDragAreaToContainer(
|
||||||
not_null<Ui::RpWidget*> container,
|
not_null<Ui::RpWidget*> container,
|
||||||
|
|
|
@ -372,8 +372,8 @@ TTLButton::TTLButton(
|
||||||
return (r.left() + r.width() > parentWidget()->width());
|
return (r.left() + r.width() > parentWidget()->width());
|
||||||
}) | rpl::distinct_until_changed(
|
}) | rpl::distinct_until_changed(
|
||||||
) | rpl::start_with_next([=](bool toHide) {
|
) | rpl::start_with_next([=](bool toHide) {
|
||||||
const auto isFirstTooltip =
|
const auto isFirstTooltip
|
||||||
!Core::App().settings().ttlVoiceClickTooltipHidden();
|
= !Core::App().settings().ttlVoiceClickTooltipHidden();
|
||||||
if (isFirstTooltip || (!isFirstTooltip && toHide)) {
|
if (isFirstTooltip || (!isFirstTooltip && toHide)) {
|
||||||
_tooltip->toggleAnimated(!toHide);
|
_tooltip->toggleAnimated(!toHide);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3898,8 +3898,8 @@ bool ListWidget::lastMessageEditRequestNotify() const {
|
||||||
if (it == end(list)) {
|
if (it == end(list)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
const auto item =
|
const auto item
|
||||||
session().data().groups().findItemToEdit((*it)->data()).get();
|
= session().data().groups().findItemToEdit((*it)->data()).get();
|
||||||
editMessageRequestNotify(item->fullId());
|
editMessageRequestNotify(item->fullId());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1849,8 +1849,8 @@ void Message::clickHandlerPressedChanged(
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
if (!_rightAction->second->ripple) {
|
if (!_rightAction->second->ripple) {
|
||||||
// Create a ripple.
|
// Create a ripple.
|
||||||
_rightAction->second->ripple =
|
_rightAction->second->ripple
|
||||||
std::make_unique<Ui::RippleAnimation>(
|
= std::make_unique<Ui::RippleAnimation>(
|
||||||
st::defaultRippleAnimation,
|
st::defaultRippleAnimation,
|
||||||
Ui::RippleAnimation::RoundRectMask(
|
Ui::RippleAnimation::RoundRectMask(
|
||||||
Size(rightSize->width()),
|
Size(rightSize->width()),
|
||||||
|
|
|
@ -150,8 +150,8 @@ bool SendActionPainter::paint(
|
||||||
const auto extraAnimationWidth = _animationLeft
|
const auto extraAnimationWidth = _animationLeft
|
||||||
? animationWidth * 2
|
? animationWidth * 2
|
||||||
: 0;
|
: 0;
|
||||||
const auto left =
|
const auto left
|
||||||
(availableWidth < _animationLeft + extraAnimationWidth)
|
= (availableWidth < _animationLeft + extraAnimationWidth)
|
||||||
? 0
|
? 0
|
||||||
: _animationLeft;
|
: _animationLeft;
|
||||||
_sendActionAnimation.paint(
|
_sendActionAnimation.paint(
|
||||||
|
|
|
@ -496,8 +496,8 @@ QSize WebPage::countOptimalSize() {
|
||||||
minHeight = resizeGetHeight(maxWidth);
|
minHeight = resizeGetHeight(maxWidth);
|
||||||
}
|
}
|
||||||
if (_sponsoredData && _sponsoredData->canReport) {
|
if (_sponsoredData && _sponsoredData->canReport) {
|
||||||
_sponsoredData->widthBeforeHint =
|
_sponsoredData->widthBeforeHint
|
||||||
st::webPageTitleStyle.font->width(siteName);
|
= st::webPageTitleStyle.font->width(siteName);
|
||||||
const auto &font = st::webPageSponsoredHintFont;
|
const auto &font = st::webPageSponsoredHintFont;
|
||||||
_sponsoredData->hintSize = QSize(
|
_sponsoredData->hintSize = QSize(
|
||||||
font->width(tr::lng_sponsored_message_revenue_button(tr::now))
|
font->width(tr::lng_sponsored_message_revenue_button(tr::now))
|
||||||
|
|
|
@ -683,13 +683,13 @@ void TopBar::createSelectionControls() {
|
||||||
_selectionActionRequests,
|
_selectionActionRequests,
|
||||||
_cancelSelection->lifetime());
|
_cancelSelection->lifetime());
|
||||||
_delete->entity()->setVisible(_canDelete);
|
_delete->entity()->setVisible(_canDelete);
|
||||||
const auto archive =
|
const auto archive = _toggleStoryPin = wrap(
|
||||||
_toggleStoryPin = wrap(Ui::CreateChild<Ui::FadeWrap<Ui::IconButton>>(
|
Ui::CreateChild<Ui::FadeWrap<Ui::IconButton>>(
|
||||||
this,
|
|
||||||
object_ptr<Ui::IconButton>(
|
|
||||||
this,
|
this,
|
||||||
_storiesArchive ? _st.storiesSave : _st.storiesArchive),
|
object_ptr<Ui::IconButton>(
|
||||||
st::infoTopBarScale));
|
this,
|
||||||
|
_storiesArchive ? _st.storiesSave : _st.storiesArchive),
|
||||||
|
st::infoTopBarScale));
|
||||||
registerToggleControlCallback(
|
registerToggleControlCallback(
|
||||||
_toggleStoryPin.data(),
|
_toggleStoryPin.data(),
|
||||||
[this] { return selectionMode() && _canToggleStoryPin; });
|
[this] { return selectionMode() && _canToggleStoryPin; });
|
||||||
|
|
|
@ -814,8 +814,8 @@ void ListWidget::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_dateBadge->goodType && clip.intersects(_dateBadge->rect)) {
|
if (_dateBadge->goodType && clip.intersects(_dateBadge->rect)) {
|
||||||
const auto scrollDateOpacity =
|
const auto scrollDateOpacity
|
||||||
_dateBadge->opacity.value(_dateBadge->shown ? 1. : 0.);
|
= _dateBadge->opacity.value(_dateBadge->shown ? 1. : 0.);
|
||||||
if (scrollDateOpacity > 0.) {
|
if (scrollDateOpacity > 0.) {
|
||||||
p.setOpacity(scrollDateOpacity);
|
p.setOpacity(scrollDateOpacity);
|
||||||
if (_dateBadge->corners.p[0].isNull()) {
|
if (_dateBadge->corners.p[0].isNull()) {
|
||||||
|
|
|
@ -77,8 +77,8 @@ base::options::toggle AutoScrollInactiveChat({
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
const char kOptionAutoScrollInactiveChat[] =
|
const char kOptionAutoScrollInactiveChat[]
|
||||||
"auto-scroll-inactive-chat";
|
= "auto-scroll-inactive-chat";
|
||||||
|
|
||||||
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||||
: Platform::MainWindow(controller) {
|
: Platform::MainWindow(controller) {
|
||||||
|
|
|
@ -35,8 +35,8 @@ constexpr auto kSpeedDebounceTimeout = crl::time(1000);
|
||||||
return base::SafeRound(speed * 10) / 10.;
|
return base::SafeRound(speed * 10) / 10.;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr auto kSpeedStickedValues =
|
constexpr auto kSpeedStickedValues
|
||||||
std::array<std::pair<float64, float64>, 7>{{
|
= std::array<std::pair<float64, float64>, 7>{{
|
||||||
{ 0.8, 0.05 },
|
{ 0.8, 0.05 },
|
||||||
{ 1.0, 0.05 },
|
{ 1.0, 0.05 },
|
||||||
{ 1.2, 0.05 },
|
{ 1.2, 0.05 },
|
||||||
|
|
|
@ -44,8 +44,8 @@ bool SystemMediaControlsManager::Supported() {
|
||||||
SystemMediaControlsManager::SystemMediaControlsManager()
|
SystemMediaControlsManager::SystemMediaControlsManager()
|
||||||
: _controls(std::make_unique<base::Platform::SystemMediaControls>()) {
|
: _controls(std::make_unique<base::Platform::SystemMediaControls>()) {
|
||||||
|
|
||||||
using PlaybackStatus =
|
using PlaybackStatus
|
||||||
base::Platform::SystemMediaControls::PlaybackStatus;
|
= base::Platform::SystemMediaControls::PlaybackStatus;
|
||||||
using Command = base::Platform::SystemMediaControls::Command;
|
using Command = base::Platform::SystemMediaControls::Command;
|
||||||
|
|
||||||
_controls->setApplicationName(AppName.utf16());
|
_controls->setApplicationName(AppName.utf16());
|
||||||
|
|
|
@ -2686,8 +2686,8 @@ bool FormController::applyPassword(const MTPDaccount_password &result) {
|
||||||
settings.notEmptyPassport = result.is_has_secure_values();
|
settings.notEmptyPassport = result.is_has_secure_values();
|
||||||
settings.request = Core::ParseCloudPasswordCheckRequest(result);
|
settings.request = Core::ParseCloudPasswordCheckRequest(result);
|
||||||
settings.unknownAlgo = result.vcurrent_algo() && !settings.request;
|
settings.unknownAlgo = result.vcurrent_algo() && !settings.request;
|
||||||
settings.unconfirmedPattern =
|
settings.unconfirmedPattern = qs(
|
||||||
qs(result.vemail_unconfirmed_pattern().value_or_empty());
|
result.vemail_unconfirmed_pattern().value_or_empty());
|
||||||
settings.newAlgo = Core::ValidateNewCloudPasswordAlgo(
|
settings.newAlgo = Core::ValidateNewCloudPasswordAlgo(
|
||||||
Core::ParseCloudPasswordAlgo(result.vnew_algo()));
|
Core::ParseCloudPasswordAlgo(result.vnew_algo()));
|
||||||
settings.newSecureAlgo = Core::ValidateNewSecureSecretAlgo(
|
settings.newSecureAlgo = Core::ValidateNewSecureSecretAlgo(
|
||||||
|
|
|
@ -26,8 +26,8 @@ struct EditContactScheme;
|
||||||
|
|
||||||
enum class ReadScanError;
|
enum class ReadScanError;
|
||||||
|
|
||||||
using preferredLangCallback =
|
using preferredLangCallback
|
||||||
Fn<rpl::producer<EditDocumentCountry>(const QString &)>;
|
= Fn<rpl::producer<EditDocumentCountry>(const QString &)>;
|
||||||
EditDocumentScheme GetDocumentScheme(
|
EditDocumentScheme GetDocumentScheme(
|
||||||
Scope::Type type,
|
Scope::Type type,
|
||||||
std::optional<Value::Type> scansType,
|
std::optional<Value::Type> scansType,
|
||||||
|
|
|
@ -315,19 +315,19 @@ bool NotificationData::init(
|
||||||
_actions.push_back("inline-reply");
|
_actions.push_back("inline-reply");
|
||||||
_actions.push_back(tr::lng_notification_reply(tr::now).toStdString());
|
_actions.push_back(tr::lng_notification_reply(tr::now).toStdString());
|
||||||
|
|
||||||
_notificationRepliedSignalId =
|
_notificationRepliedSignalId
|
||||||
_interface.signal_notification_replied().connect([=](
|
= _interface.signal_notification_replied().connect([=](
|
||||||
XdgNotifications::Notifications,
|
XdgNotifications::Notifications,
|
||||||
uint id,
|
uint id,
|
||||||
std::string text) {
|
std::string text) {
|
||||||
Core::Sandbox::Instance().customEnterFromEventLoop([&] {
|
Core::Sandbox::Instance().customEnterFromEventLoop([&] {
|
||||||
if (id == _notificationId) {
|
if (id == _notificationId) {
|
||||||
_manager->notificationReplied(
|
_manager->notificationReplied(
|
||||||
_id,
|
_id,
|
||||||
{ QString::fromStdString(text), {} });
|
{ QString::fromStdString(text), {} });
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_actionInvokedSignalId = _interface.signal_action_invoked().connect([=](
|
_actionInvokedSignalId = _interface.signal_action_invoked().connect([=](
|
||||||
|
|
|
@ -551,13 +551,11 @@ NSRect PeerRectByIndex(int index) {
|
||||||
const auto processOnline = [=](const auto &pin) {
|
const auto processOnline = [=](const auto &pin) {
|
||||||
// TODO: this should be replaced
|
// TODO: this should be replaced
|
||||||
// with the global application timer for online statuses.
|
// with the global application timer for online statuses.
|
||||||
const auto onlineChanges =
|
const auto onlineChanges
|
||||||
peerChangedLifetime->make_state<rpl::event_stream<PeerData*>>();
|
= peerChangedLifetime->make_state<rpl::event_stream<PeerData*>>();
|
||||||
const auto peer = pin->peer;
|
const auto peer = pin->peer;
|
||||||
const auto onlineTimer =
|
const auto onlineTimer = peerChangedLifetime->make_state<base::Timer>(
|
||||||
peerChangedLifetime->make_state<base::Timer>([=] {
|
[=] { onlineChanges->fire_copy({ peer }); });
|
||||||
onlineChanges->fire_copy({ peer });
|
|
||||||
});
|
|
||||||
|
|
||||||
const auto callTimer = [=](const auto &pin) {
|
const auto callTimer = [=](const auto &pin) {
|
||||||
onlineTimer->cancel();
|
onlineTimer->cancel();
|
||||||
|
|
|
@ -135,8 +135,8 @@ const auto kAudioItemIdentifier = @"touchbarAudio";
|
||||||
|
|
||||||
if (isEqual(kMainItemIdentifier)) {
|
if (isEqual(kMainItemIdentifier)) {
|
||||||
auto *item = [[GroupTouchBarItem alloc] initWithIdentifier:itemId];
|
auto *item = [[GroupTouchBarItem alloc] initWithIdentifier:itemId];
|
||||||
item.groupTouchBar =
|
item.groupTouchBar
|
||||||
[[[TouchBarMain alloc]
|
= [[[TouchBarMain alloc]
|
||||||
init:_controller
|
init:_controller
|
||||||
touchBarSwitches:_touchBarSwitches.events()] autorelease];
|
touchBarSwitches:_touchBarSwitches.events()] autorelease];
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
|
|
|
@ -605,8 +605,8 @@ QPointer<Ui::RpWidget> Business::createPinnedToBottom(
|
||||||
});
|
});
|
||||||
{
|
{
|
||||||
const auto callback = [=](int value) {
|
const auto callback = [=](int value) {
|
||||||
const auto options =
|
auto &api = _controller->session().api();
|
||||||
_controller->session().api().premium().subscriptionOptions();
|
const auto options = api.premium().subscriptionOptions();
|
||||||
if (options.empty()) {
|
if (options.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1211,8 +1211,8 @@ QPointer<Ui::RpWidget> Premium::createPinnedToBottom(
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
const auto callback = [=](int value) {
|
const auto callback = [=](int value) {
|
||||||
const auto options =
|
auto &api = _controller->session().api();
|
||||||
_controller->session().api().premium().subscriptionOptions();
|
const auto options = api.premium().subscriptionOptions();
|
||||||
if (options.empty()) {
|
if (options.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1991,8 +1991,8 @@ void Account::readStickerSets(
|
||||||
if (datesCount != scnt) {
|
if (datesCount != scnt) {
|
||||||
return failed();
|
return failed();
|
||||||
}
|
}
|
||||||
const auto fillDates =
|
const auto fillDates
|
||||||
((set->id == Data::Stickers::CloudRecentSetId)
|
= ((set->id == Data::Stickers::CloudRecentSetId)
|
||||||
|| (set->id == Data::Stickers::CloudRecentAttachedSetId))
|
|| (set->id == Data::Stickers::CloudRecentAttachedSetId))
|
||||||
&& (set->stickers.size() == datesCount);
|
&& (set->stickers.size() == datesCount);
|
||||||
if (fillDates) {
|
if (fillDates) {
|
||||||
|
|
|
@ -146,8 +146,8 @@ ChooseDateTimeBoxDescriptor ChooseDateTimeBox(
|
||||||
width);
|
width);
|
||||||
}, content->lifetime());
|
}, content->lifetime());
|
||||||
|
|
||||||
const auto calendar =
|
const auto calendar
|
||||||
content->lifetime().make_state<QPointer<CalendarBox>>();
|
= content->lifetime().make_state<QPointer<CalendarBox>>();
|
||||||
const auto calendarStyle = args.style.calendarStyle;
|
const auto calendarStyle = args.style.calendarStyle;
|
||||||
state->day->focusedChanges(
|
state->day->focusedChanges(
|
||||||
) | rpl::start_with_next([=](bool focused) {
|
) | rpl::start_with_next([=](bool focused) {
|
||||||
|
|
|
@ -414,8 +414,8 @@ void BlobsWidget::init(int diameter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main circle.
|
// Main circle.
|
||||||
const auto circleProgress =
|
const auto circleProgress
|
||||||
Clamp(_switchConnectingProgress - kBlobPartAnimation)
|
= Clamp(_switchConnectingProgress - kBlobPartAnimation)
|
||||||
/ kFillCirclePartAnimation;
|
/ kFillCirclePartAnimation;
|
||||||
const auto skipColoredCircle = (circleProgress == 1.);
|
const auto skipColoredCircle = (circleProgress == 1.);
|
||||||
|
|
||||||
|
@ -744,8 +744,8 @@ void CallMuteButton::init() {
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
// State type.
|
// State type.
|
||||||
const auto previousType =
|
const auto previousType
|
||||||
lifetime().make_state<CallMuteButtonType>(_state.current().type);
|
= lifetime().make_state<CallMuteButtonType>(_state.current().type);
|
||||||
setHandleMouseState(HandleMouseState::Disabled);
|
setHandleMouseState(HandleMouseState::Disabled);
|
||||||
|
|
||||||
refreshGradients();
|
refreshGradients();
|
||||||
|
|
|
@ -143,8 +143,8 @@ void ShareBotGame(
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
const char kOptionViewProfileInChatsListContextMenu[] =
|
const char kOptionViewProfileInChatsListContextMenu[]
|
||||||
"view-profile-in-chats-list-context-menu";
|
= "view-profile-in-chats-list-context-menu";
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -2015,10 +2015,10 @@ void SessionController::resizeForThirdSection() {
|
||||||
|
|
||||||
auto &settings = Core::App().settings();
|
auto &settings = Core::App().settings();
|
||||||
auto layout = computeColumnLayout();
|
auto layout = computeColumnLayout();
|
||||||
auto tabbedSelectorSectionEnabled =
|
auto tabbedSelectorSectionEnabled
|
||||||
settings.tabbedSelectorSectionEnabled();
|
= settings.tabbedSelectorSectionEnabled();
|
||||||
auto thirdSectionInfoEnabled =
|
auto thirdSectionInfoEnabled
|
||||||
settings.thirdSectionInfoEnabled();
|
= settings.thirdSectionInfoEnabled();
|
||||||
settings.setTabbedSelectorSectionEnabled(false);
|
settings.setTabbedSelectorSectionEnabled(false);
|
||||||
settings.setThirdSectionInfoEnabled(false);
|
settings.setThirdSectionInfoEnabled(false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue