mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
fix: build for macOS
This commit is contained in:
parent
214f48922e
commit
4e0ffc1e28
11 changed files with 10 additions and 35 deletions
|
@ -12,7 +12,6 @@
|
|||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/data/ayu_database.h"
|
||||
#include "lang/lang_instance.h"
|
||||
#include "utils/taptic_engine/taptic_engine.h"
|
||||
|
||||
namespace AyuInfra {
|
||||
|
||||
|
@ -46,8 +45,6 @@ void init() {
|
|||
initDatabase();
|
||||
initFonts();
|
||||
initWorker();
|
||||
|
||||
TapticEngine::init();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21710,7 +21710,7 @@ namespace sqlite_orm {
|
|||
// F O::*
|
||||
template<typename F, typename ColRef, satisfies<std::is_member_pointer, ColRef> = true>
|
||||
static auto make_cte_column(std::string name, const ColRef& finalColRef) {
|
||||
using object_type = table_type_of_t<ColRef>;
|
||||
// using object_type = table_type_of_t<ColRef>;
|
||||
using column_type = column_t<ColRef, empty_setter>;
|
||||
|
||||
return column_type{std::move(name), finalColRef, empty_setter{}};
|
||||
|
@ -22027,7 +22027,7 @@ namespace sqlite_orm {
|
|||
|
||||
template<class Table>
|
||||
void create_table(sqlite3* db, const std::string& tableName, const Table& table) {
|
||||
using table_type = std::decay_t<decltype(table)>;
|
||||
// using table_type = std::decay_t<decltype(table)>;
|
||||
using context_t = serializer_context<db_objects_type>;
|
||||
|
||||
context_t context{this->db_objects};
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
namespace TapticEngine {
|
||||
namespace Impl {
|
||||
|
||||
void init() {
|
||||
}
|
||||
|
||||
void generateGeneric() {
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace TapticEngine {
|
||||
namespace Impl {
|
||||
|
||||
void init();
|
||||
void generateGeneric();
|
||||
void generateAlignment();
|
||||
void generateLevelChange();
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace TapticEngine {
|
||||
namespace Impl {
|
||||
|
||||
void init();
|
||||
void generateGeneric();
|
||||
void generateAlignment();
|
||||
void generateLevelChange();
|
||||
|
|
|
@ -7,20 +7,10 @@
|
|||
namespace TapticEngine {
|
||||
namespace Impl {
|
||||
|
||||
NSHapticFeedbackManager *hapticFeedbackManager = nil;
|
||||
|
||||
void init() {
|
||||
if (@available(macOS 10.11, *)) {
|
||||
hapticFeedbackManager = [NSHapticFeedbackManager defaultPerformer];
|
||||
}
|
||||
}
|
||||
|
||||
void performHapticFeedback(NSHapticFeedbackPattern pattern) {
|
||||
if (@available(macOS 10.11, *)) {
|
||||
if (hapticFeedbackManager) {
|
||||
[hapticFeedbackManager performFeedbackPattern:pattern performanceTime:NSHapticFeedbackPerformanceTimeNow];
|
||||
}
|
||||
}
|
||||
[[NSHapticFeedbackManager defaultPerformer]
|
||||
performFeedbackPattern:pattern
|
||||
performanceTime:NSHapticFeedbackPerformanceTimeDrawCompleted];
|
||||
}
|
||||
|
||||
void generateGeneric() {
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
namespace TapticEngine {
|
||||
|
||||
void init() {
|
||||
Impl::init();
|
||||
}
|
||||
|
||||
void generateGeneric() {
|
||||
Impl::generateGeneric();
|
||||
}
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
namespace TapticEngine {
|
||||
|
||||
void init();
|
||||
void generateGeneric();
|
||||
void generateAlignment();
|
||||
void generateLevelChange();
|
||||
// void deinit();
|
||||
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ bool NeedSaveMessage(not_null<HistoryItem *> item) {
|
|||
}
|
||||
|
||||
if (const auto possiblyBot = item->history()->peer->asUser()) {
|
||||
return !possiblyBot->isBot() || settings->saveForBots && possiblyBot->isBot();
|
||||
return !possiblyBot->isBot() || (settings->saveForBots && possiblyBot->isBot());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -672,7 +672,7 @@ void HistoryInner::setupSwipeReply() {
|
|||
}
|
||||
const auto item = view->data();
|
||||
const auto canSendReply = CanSendReply(item);
|
||||
const auto canReply = (canSendReply || item->allowsForward() && !item->isDeleted());
|
||||
const auto canReply = canSendReply || (item->allowsForward() && !item->isDeleted());
|
||||
if (!canReply) {
|
||||
return true;
|
||||
}
|
||||
|
@ -2658,7 +2658,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
return;
|
||||
}
|
||||
const auto canSendReply = CanSendReply(item);
|
||||
const auto canReply = canSendReply || item->allowsForward() && !item->isDeleted();
|
||||
const auto canReply = canSendReply || (item->allowsForward() && !item->isDeleted());
|
||||
if (canReply) {
|
||||
const auto selected = selectedQuote(item);
|
||||
auto text = selected
|
||||
|
|
|
@ -8221,9 +8221,8 @@ void HistoryWidget::handlePeerUpdate() {
|
|||
if (!_showAnimation) {
|
||||
const auto blockChanged = (_unblock->isHidden() == isBlocked());
|
||||
if (blockChanged
|
||||
|| (!isBlocked()
|
||||
&& (_joinChannel->isHidden() == isJoinChannel())
|
||||
|| (isMuteUnmute() && _discuss->isHidden() == hasDiscussionGroup()))) {
|
||||
|| ((!isBlocked() && _joinChannel->isHidden() == isJoinChannel())
|
||||
|| (isMuteUnmute() && _discuss->isHidden() == hasDiscussionGroup()))) {
|
||||
resize = true;
|
||||
}
|
||||
if (updateCanSendMessage()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue