diff --git a/Telegram/SourceFiles/ayu/ayu_infra.cpp b/Telegram/SourceFiles/ayu/ayu_infra.cpp index 28f270b79..06d5bfb9f 100644 --- a/Telegram/SourceFiles/ayu/ayu_infra.cpp +++ b/Telegram/SourceFiles/ayu/ayu_infra.cpp @@ -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(); } } diff --git a/Telegram/SourceFiles/ayu/libs/sqlite/sqlite_orm.h b/Telegram/SourceFiles/ayu/libs/sqlite/sqlite_orm.h index 5d0abe428..db441975b 100644 --- a/Telegram/SourceFiles/ayu/libs/sqlite/sqlite_orm.h +++ b/Telegram/SourceFiles/ayu/libs/sqlite/sqlite_orm.h @@ -21710,7 +21710,7 @@ namespace sqlite_orm { // F O::* template = true> static auto make_cte_column(std::string name, const ColRef& finalColRef) { - using object_type = table_type_of_t; + // using object_type = table_type_of_t; using column_type = column_t; return column_type{std::move(name), finalColRef, empty_setter{}}; @@ -22027,7 +22027,7 @@ namespace sqlite_orm { template void create_table(sqlite3* db, const std::string& tableName, const Table& table) { - using table_type = std::decay_t; + // using table_type = std::decay_t; using context_t = serializer_context; context_t context{this->db_objects}; diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.cpp b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.cpp index ee486e70b..d36d9cc65 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.cpp +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.cpp @@ -5,9 +5,6 @@ namespace TapticEngine { namespace Impl { -void init() { -} - void generateGeneric() { } diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.h b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.h index d2a78b2a5..dab4f9beb 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.h +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_dummy.h @@ -3,7 +3,6 @@ namespace TapticEngine { namespace Impl { -void init(); void generateGeneric(); void generateAlignment(); void generateLevelChange(); diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.h b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.h index d2a78b2a5..dab4f9beb 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.h +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.h @@ -3,7 +3,6 @@ namespace TapticEngine { namespace Impl { -void init(); void generateGeneric(); void generateAlignment(); void generateLevelChange(); diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.mm b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.mm index f0c390d34..11cd759ec 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.mm +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/platform/taptic_engine_mac.mm @@ -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() { diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.cpp b/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.cpp index 7d4865413..5806ceec0 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.cpp +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.cpp @@ -8,10 +8,6 @@ namespace TapticEngine { -void init() { - Impl::init(); -} - void generateGeneric() { Impl::generateGeneric(); } diff --git a/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.h b/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.h index 2534f550a..9446efc43 100644 --- a/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.h +++ b/Telegram/SourceFiles/ayu/utils/taptic_engine/taptic_engine.h @@ -2,10 +2,8 @@ namespace TapticEngine { -void init(); void generateGeneric(); void generateAlignment(); void generateLevelChange(); -// void deinit(); } diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp index ca52310ca..ec6ecadf4 100644 --- a/Telegram/SourceFiles/data/data_session.cpp +++ b/Telegram/SourceFiles/data/data_session.cpp @@ -221,7 +221,7 @@ bool NeedSaveMessage(not_null 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; } diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 364d9c650..abf19c62e 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -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 diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 0a8b5420e..0bb2b3908 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -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()) {