mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix build on macOS.
This commit is contained in:
@@ -422,7 +422,7 @@ void PreloadSticker(const std::shared_ptr<Data::DocumentMedia> &media) {
|
||||
}
|
||||
const auto width = st::premiumVideoWidth;
|
||||
const auto height = state->blurred.height()
|
||||
? state->blurred.height()
|
||||
? (state->blurred.height() / state->blurred.devicePixelRatio())
|
||||
: width;
|
||||
const auto left = (st::boxWideWidth - width) / 2;
|
||||
const auto top = st::premiumPreviewHeight - height;
|
||||
|
@@ -373,16 +373,16 @@ bool PeerMatchesTypes(
|
||||
return (types & PeerType::Group);
|
||||
}
|
||||
|
||||
PeerTypes ParseChooseTypes(const QString &choose) {
|
||||
PeerTypes ParseChooseTypes(QStringView choose) {
|
||||
auto result = PeerTypes();
|
||||
for (const auto &entry : choose.split(QChar(' '))) {
|
||||
if (entry == "users") {
|
||||
if (entry == u"users"_q) {
|
||||
result |= PeerType::User;
|
||||
} else if (entry == "bots") {
|
||||
} else if (entry == u"bots"_q) {
|
||||
result |= PeerType::Bot;
|
||||
} else if (entry == "groups") {
|
||||
} else if (entry == u"groups"_q) {
|
||||
result |= PeerType::Group;
|
||||
} else if (entry == "channels") {
|
||||
} else if (entry == u"channels"_q) {
|
||||
result |= PeerType::Broadcast;
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ using PeerTypes = base::flags<PeerType>;
|
||||
not_null<PeerData*> peer,
|
||||
not_null<UserData*> bot,
|
||||
PeerTypes types);
|
||||
[[nodiscard]] PeerTypes ParseChooseTypes(const QString &choose);
|
||||
[[nodiscard]] PeerTypes ParseChooseTypes(QStringView choose);
|
||||
|
||||
struct AttachWebViewBot {
|
||||
not_null<UserData*> user;
|
||||
|
@@ -843,7 +843,7 @@ void SessionController::setupPremiumToast() {
|
||||
Ui::Toast::Show(
|
||||
Window::Show(this).toastParent(),
|
||||
{
|
||||
.text = tr::lng_premium_success(tr::now),
|
||||
.text = { tr::lng_premium_success(tr::now) },
|
||||
.st = &st::defaultToast,
|
||||
});
|
||||
}, _lifetime);
|
||||
|
Reference in New Issue
Block a user