mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-26 15:33:02 +02:00
Fix build with Xcode.
This commit is contained in:
parent
6a3989488e
commit
fcd37adc38
4 changed files with 16 additions and 6 deletions
|
@ -83,7 +83,6 @@ void ConfirmApproval(
|
||||||
not_null<HistoryItem*> item,
|
not_null<HistoryItem*> item,
|
||||||
TimeId scheduleDate = 0,
|
TimeId scheduleDate = 0,
|
||||||
Fn<void()> accepted = nullptr) {
|
Fn<void()> accepted = nullptr) {
|
||||||
using Flag = MTPmessages_ToggleSuggestedPostApproval::Flag;
|
|
||||||
const auto suggestion = item->Get<HistoryMessageSuggestedPost>();
|
const auto suggestion = item->Get<HistoryMessageSuggestedPost>();
|
||||||
if (!suggestion
|
if (!suggestion
|
||||||
|| suggestion->accepted
|
|| suggestion->accepted
|
||||||
|
|
|
@ -101,9 +101,21 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend inline constexpr auto operator<=>(CreditsAmount, CreditsAmount)
|
// AppleClang :/
|
||||||
= default;
|
// friend inline auto operator<=>(CreditsAmount, CreditsAmount)
|
||||||
friend inline constexpr bool operator==(CreditsAmount, CreditsAmount)
|
// = default;
|
||||||
|
friend inline constexpr auto operator<=>(
|
||||||
|
CreditsAmount a,
|
||||||
|
CreditsAmount b) {
|
||||||
|
if (const auto r1 = (int(a._ton) <=> int(b._ton)); r1 != 0) {
|
||||||
|
return r1;
|
||||||
|
} else if (auto r2 = (a._whole <=> b._whole); r2 != 0) {
|
||||||
|
return r2;
|
||||||
|
}
|
||||||
|
return (a._nano <=> b._nano);
|
||||||
|
}
|
||||||
|
|
||||||
|
friend inline bool operator==(CreditsAmount, CreditsAmount)
|
||||||
= default;
|
= default;
|
||||||
|
|
||||||
[[nodiscard]] CreditsAmount abs() const {
|
[[nodiscard]] CreditsAmount abs() const {
|
||||||
|
|
|
@ -256,7 +256,6 @@ void TodoList::updateTexts() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (_flags != _todolist->flags() || _subtitle.isEmpty()) {
|
if (_flags != _todolist->flags() || _subtitle.isEmpty()) {
|
||||||
using Flag = PollData::Flag;
|
|
||||||
_flags = _todolist->flags();
|
_flags = _todolist->flags();
|
||||||
_subtitle.setText(
|
_subtitle.setText(
|
||||||
st::msgDateTextStyle,
|
st::msgDateTextStyle,
|
||||||
|
|
|
@ -81,7 +81,7 @@ std::optional<int64> ParseAmountNano(QString trimmed) {
|
||||||
auto digitsCount = 0;
|
auto digitsCount = 0;
|
||||||
for (auto i = 0; i != result.text.size();) {
|
for (auto i = 0; i != result.text.size();) {
|
||||||
const auto ch = result.text[i];
|
const auto ch = result.text[i];
|
||||||
const auto atSeparator = result.text.midRef(i).startsWith(separator);
|
const auto atSeparator = QStringView(result.text).mid(i).startsWith(separator);
|
||||||
if (ch >= '0' && ch <= '9' && digitsCount < kMaxDigitsCount) {
|
if (ch >= '0' && ch <= '9' && digitsCount < kMaxDigitsCount) {
|
||||||
++i;
|
++i;
|
||||||
++digitsCount;
|
++digitsCount;
|
||||||
|
|
Loading…
Add table
Reference in a new issue