Merge pull request #300787 from NickCao/telegram-desktop

telegram-desktop: 4.15.2 -> 4.16.0

authored by Nick Cao and committed by GitHub 4a6435ec d9b2bc78

+66 -4
+2 -4
pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix
··· 30 30 , range-v3 31 31 , tl-expected 32 32 , hunspell 33 - , glibmm_2_68 34 33 , webkitgtk_6_0 35 34 , jemalloc 36 35 , rnnoise ··· 64 63 in 65 64 stdenv.mkDerivation rec { 66 65 pname = "telegram-desktop"; 67 - version = "4.15.2"; 66 + version = "4.16.0"; 68 67 69 68 src = fetchFromGitHub { 70 69 owner = "telegramdesktop"; 71 70 repo = "tdesktop"; 72 71 rev = "v${version}"; 73 72 fetchSubmodules = true; 74 - hash = "sha256-gzwDezOmIvSF4fPHAslf8DyBAgCYkD5ySX+MKKMXhSg="; 73 + hash = "sha256-llrHN/XCMKwAvbyUZ/92OUjAEOPJKPbDfldVChLZo5k="; 75 74 }; 76 75 77 76 patches = [ ··· 144 143 libpulseaudio 145 144 pipewire 146 145 hunspell 147 - glibmm_2_68 148 146 webkitgtk_6_0 149 147 jemalloc 150 148 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
+64
pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch
··· 49 49 const auto state = DetectBatteryState(); 50 50 if (!state.has || !state.draining) { 51 51 return false; 52 + Submodule Telegram/lib_webrtc contains modified content 53 + diff --git a/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm b/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm 54 + index 7521c08..5e22da2 100644 55 + --- a/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm 56 + +++ b/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm 57 + @@ -364,6 +364,7 @@ EnvironmentMac::EnvironmentMac(not_null<EnvironmentDelegate*> delegate) 58 + DefaultCaptureDeviceChangedMonitor.registerEnvironment(this); 59 + AudioDeviceListChangedMonitor.registerEnvironment(this); 60 + 61 + +#if 0 62 + if (@available(macOS 14.0, *)) { 63 + const auto weak = base::make_weak(this); 64 + id block = [^(BOOL shouldBeMuted){ 65 + @@ -387,6 +388,7 @@ EnvironmentMac::EnvironmentMac(not_null<EnvironmentDelegate*> delegate) 66 + setInputMuteStateChangeHandler:block 67 + error:nil]; 68 + } 69 + +#endif 70 + } 71 + 72 + EnvironmentMac::~EnvironmentMac() { 73 + @@ -537,15 +539,18 @@ void EnvironmentMac::devicesRequested(DeviceType type) { 74 + } 75 + 76 + void EnvironmentMac::setCaptureMuted(bool muted) { 77 + +#if 0 78 + if (@available(macOS 14.0, *)) { 79 + if (!_captureMuteNotification) { 80 + const auto value = muted ? YES : NO; 81 + [[AVAudioApplication sharedInstance] setInputMuted:value error:nil]; 82 + } 83 + } 84 + +#endif 85 + } 86 + 87 + void EnvironmentMac::captureMuteSubscribe() { 88 + +#if 0 89 + if (@available(macOS 14.0, *)) { 90 + id observer = [[InputMuteObserver alloc] init]; 91 + [[[NSWorkspace sharedWorkspace] notificationCenter] 92 + @@ -578,6 +583,7 @@ void EnvironmentMac::captureMuteSubscribe() { 93 + [observer release]; 94 + }); 95 + } 96 + +#endif 97 + } 98 + 99 + void EnvironmentMac::captureMuteUnsubscribe() { 100 + @@ -595,6 +601,7 @@ void EnvironmentMac::captureMuteRestartAdm() { 101 + void EnvironmentMac::setCaptureMuteTracker( 102 + not_null<CaptureMuteTracker*> tracker, 103 + bool track) { 104 + +#if 0 105 + if (@available(macOS 14.0, *)) { 106 + if (track) { 107 + if (!_captureMuteTracker) { 108 + @@ -619,6 +626,7 @@ void EnvironmentMac::setCaptureMuteTracker( 109 + } 110 + } 111 + } 112 + +#endif 113 + } 114 + 115 + std::unique_ptr<Environment> CreateEnvironment( 52 116 Submodule Telegram/lib_webview contains modified content 53 117 diff --git a/Telegram/lib_webview/webview/platform/mac/webview_mac.mm b/Telegram/lib_webview/webview/platform/mac/webview_mac.mm 54 118 index 738e574..80ff5f0 100644