Fix build with Xcode.

This commit is contained in:
John Preston 2023-08-29 17:02:23 +04:00
parent 02e37ab2f2
commit 7b184e553b
1 changed files with 17 additions and 19 deletions

View File

@ -16,25 +16,6 @@ enum class DefaultNotify;
namespace Settings {
class NotificationsType;
template <Data::DefaultNotify kType>
struct NotificationsTypeMetaImplementation : SectionMeta {
object_ptr<AbstractSection> create(
not_null<QWidget*> parent,
not_null<Window::SessionController*> controller
) const final override {
return object_ptr<NotificationsType>(parent, controller, kType);
}
[[nodiscard]] static not_null<SectionMeta*> Meta() {
static NotificationsTypeMetaImplementation result;
return &result;
}
};
[[nodiscard]] Type NotificationsTypeId(Data::DefaultNotify type);
class NotificationsType : public AbstractSection {
public:
NotificationsType(
@ -53,6 +34,23 @@ private:
};
template <Data::DefaultNotify kType>
struct NotificationsTypeMetaImplementation : SectionMeta {
object_ptr<AbstractSection> create(
not_null<QWidget*> parent,
not_null<Window::SessionController*> controller
) const final override {
return object_ptr<NotificationsType>(parent, controller, kType);
}
[[nodiscard]] static not_null<SectionMeta*> Meta() {
static NotificationsTypeMetaImplementation result;
return &result;
}
};
[[nodiscard]] Type NotificationsTypeId(Data::DefaultNotify type);
[[nodiscard]] bool NotificationsEnabledForType(
not_null<Main::Session*> session,
Data::DefaultNotify type);