diff --git a/Telegram/SourceFiles/ayu/ui/settings/settings_appearance.cpp b/Telegram/SourceFiles/ayu/ui/settings/settings_appearance.cpp index 2e3a62dc55..139838a582 100644 --- a/Telegram/SourceFiles/ayu/ui/settings/settings_appearance.cpp +++ b/Telegram/SourceFiles/ayu/ui/settings/settings_appearance.cpp @@ -92,6 +92,9 @@ void BuildAppIcon(SectionBuilder &builder, AyuSectionBuilder &ayu) { builder.addSkip(); builder.addDividerText(tr::ayu_HideNotificationBadgeDescription()); builder.addSkip(); +#else + builder.addDivider(); + builder.addSkip(); #endif } diff --git a/Telegram/SourceFiles/ayu/utils/telegram_helpers.cpp b/Telegram/SourceFiles/ayu/utils/telegram_helpers.cpp index 0ba5435184..92d71f7119 100644 --- a/Telegram/SourceFiles/ayu/utils/telegram_helpers.cpp +++ b/Telegram/SourceFiles/ayu/utils/telegram_helpers.cpp @@ -977,12 +977,12 @@ static bool prependPseudoReplyImpl( shiftEntities(textWithTags.tags, prefixLength); EntitiesInText newEntities; - const auto nameLength = name.length(); + const auto nameLength = int(name.length()); newEntities.push_back(EntityInText{ EntityType::Blockquote, 0, - prefix.length(), + int(prefix.length()), {} }); diff --git a/Telegram/SourceFiles/media/clip/media_clip_reader.cpp b/Telegram/SourceFiles/media/clip/media_clip_reader.cpp index ee7487269b..cfecac6c9a 100644 --- a/Telegram/SourceFiles/media/clip/media_clip_reader.cpp +++ b/Telegram/SourceFiles/media/clip/media_clip_reader.cpp @@ -65,6 +65,9 @@ QImage PrepareFrame( if (hasAlpha && request.keepAlpha) { cache.fill(Qt::transparent); } + if (!QCoreApplication::instance()) { // fix crash on macOS on exit + return cache; + } { auto p = QPainter(&cache); const auto framew = request.frame.width(); diff --git a/Telegram/SourceFiles/platform/mac/launcher_mac.mm b/Telegram/SourceFiles/platform/mac/launcher_mac.mm index 8fecc6bfc5..0fe503dfa0 100644 --- a/Telegram/SourceFiles/platform/mac/launcher_mac.mm +++ b/Telegram/SourceFiles/platform/mac/launcher_mac.mm @@ -33,15 +33,18 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { } @autoreleasepool { -#ifdef OS_MAC_STORE - // In AppStore version we don't have Updater. - // We just relaunch our app. if (action == UpdaterLaunch::JustRelaunch) { - NSDictionary *conf = [NSDictionary dictionaryWithObject:[NSArray array] forKey:NSWorkspaceLaunchConfigurationArguments]; - [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:Q2NSString(cExeDir() + cExeName())] options:NSWorkspaceLaunchAsync | NSWorkspaceLaunchNewInstance configuration:conf error:0]; - return true; +#ifdef OS_MAC_STORE + const auto updaterDisabled = true; +#else + const auto updaterDisabled = Core::UpdaterDisabled(); +#endif + if (updaterDisabled) { + NSDictionary *conf = [NSDictionary dictionaryWithObject:[NSArray array] forKey:NSWorkspaceLaunchConfigurationArguments]; + [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:Q2NSString(cExeDir() + cExeName())] options:NSWorkspaceLaunchAsync | NSWorkspaceLaunchNewInstance configuration:conf error:0]; + return true; + } } -#endif // OS_MAC_STORE NSString *path = @"", *args = @""; @try { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 8f46f565f2..f9f592a3a0 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 8f46f565f2fe31d173d17528199a9820168a1c30 +Subproject commit f9f592a3a02d9f0d42dc5968a0e8a7f92258544c