From 21e8bc02cadc8e9996eef72e882ec0b9f9976ba5 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 1 Jul 2025 19:38:35 +0200 Subject: [PATCH] Cleanup --- .../Telegram-iOS/en.lproj/Localizable.strings | 2 + .../Components/AnimationCache/ImageDCT/BUILD | 2 + .../AnimationCache/ImageDCT/Sources/DCT.cpp | 42 ++----------------- .../Sources/StarsWithdrawalScreen.swift | 4 +- .../TelegramUI/Sources/ChatController.swift | 6 +++ third-party/webrtc/BUILD | 4 +- 6 files changed, 18 insertions(+), 42 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 2e8addd742..ccfb268e9c 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -14448,6 +14448,8 @@ Sorry for the inconvenience."; "SuggestPost.SetTimeFormat.Date" = "%@"; "SuggestPost.SetTimeFormat.TodayAt" = "Today at %@"; "SuggestPost.SetTimeFormat.TomorrowAt" = "Tomorrow at %@"; +"SuggestPost.SetTimeFormat.Any" = "Anytime"; +"SuggestPost.SetTime.Label" = "Time"; "Chat.TodoItemCompletionTimestamp.Date" = "completed %@"; "Chat.TodoItemCompletionTimestamp.TodayAt" = "completed today at %@"; diff --git a/submodules/TelegramUI/Components/AnimationCache/ImageDCT/BUILD b/submodules/TelegramUI/Components/AnimationCache/ImageDCT/BUILD index 030187e3e1..fdf548af65 100644 --- a/submodules/TelegramUI/Components/AnimationCache/ImageDCT/BUILD +++ b/submodules/TelegramUI/Components/AnimationCache/ImageDCT/BUILD @@ -16,6 +16,8 @@ objc_library( includes = [ "PublicHeaders", ], + copts = [ + ], sdk_frameworks = [ "Foundation", "Accelerate", diff --git a/submodules/TelegramUI/Components/AnimationCache/ImageDCT/Sources/DCT.cpp b/submodules/TelegramUI/Components/AnimationCache/ImageDCT/Sources/DCT.cpp index e918a229aa..d953cefbbe 100644 --- a/submodules/TelegramUI/Components/AnimationCache/ImageDCT/Sources/DCT.cpp +++ b/submodules/TelegramUI/Components/AnimationCache/ImageDCT/Sources/DCT.cpp @@ -371,43 +371,9 @@ typedef int16_t tran_low_t; typedef int32_t tran_high_t; typedef int16_t tran_coef_t; -static const tran_coef_t cospi_1_64 = 16364; -static const tran_coef_t cospi_2_64 = 16305; -static const tran_coef_t cospi_3_64 = 16207; -static const tran_coef_t cospi_4_64 = 16069; -static const tran_coef_t cospi_5_64 = 15893; -static const tran_coef_t cospi_6_64 = 15679; -static const tran_coef_t cospi_7_64 = 15426; static const tran_coef_t cospi_8_64 = 15137; -static const tran_coef_t cospi_9_64 = 14811; -static const tran_coef_t cospi_10_64 = 14449; -static const tran_coef_t cospi_11_64 = 14053; -static const tran_coef_t cospi_12_64 = 13623; -static const tran_coef_t cospi_13_64 = 13160; -static const tran_coef_t cospi_14_64 = 12665; -static const tran_coef_t cospi_15_64 = 12140; static const tran_coef_t cospi_16_64 = 11585; -static const tran_coef_t cospi_17_64 = 11003; -static const tran_coef_t cospi_18_64 = 10394; -static const tran_coef_t cospi_19_64 = 9760; -static const tran_coef_t cospi_20_64 = 9102; -static const tran_coef_t cospi_21_64 = 8423; -static const tran_coef_t cospi_22_64 = 7723; -static const tran_coef_t cospi_23_64 = 7005; static const tran_coef_t cospi_24_64 = 6270; -static const tran_coef_t cospi_25_64 = 5520; -static const tran_coef_t cospi_26_64 = 4756; -static const tran_coef_t cospi_27_64 = 3981; -static const tran_coef_t cospi_28_64 = 3196; -static const tran_coef_t cospi_29_64 = 2404; -static const tran_coef_t cospi_30_64 = 1606; -static const tran_coef_t cospi_31_64 = 804; - -// 16384 * sqrt(2) * sin(kPi/9) * 2 / 3 -static const tran_coef_t sinpi_1_9 = 5283; -static const tran_coef_t sinpi_2_9 = 9929; -static const tran_coef_t sinpi_3_9 = 13377; -static const tran_coef_t sinpi_4_9 = 15212; #define DCT_CONST_BITS 14 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1)) @@ -490,7 +456,7 @@ void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { #define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n)-1))) >> (n)) -static inline tran_high_t dct_const_round_shift(tran_high_t input) { +/*static inline tran_high_t dct_const_round_shift(tran_high_t input) { tran_high_t rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); return (tran_high_t)rv; } @@ -507,11 +473,11 @@ static inline tran_high_t check_range(tran_high_t input) { assert(input <= INT16_MAX); #endif // CONFIG_COEFFICIENT_RANGE_CHECKING return input; -} +}*/ #define WRAPLOW(x) ((int32_t)check_range(x)) -void idct4_c(const tran_low_t *input, tran_low_t *output) { +/*void idct4_c(const tran_low_t *input, tran_low_t *output) { int16_t step[4]; tran_high_t temp1, temp2; @@ -553,7 +519,7 @@ void vpx_idct4x4_16_add_c(const tran_low_t *input, tran_low_t *dest, int stride) dest[j * stride + i] = ROUND_POWER_OF_TWO(temp_out[j], 4); } } -} +}*/ #if defined(__aarch64__) diff --git a/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift b/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift index 0195e200c4..24ccaedbe6 100644 --- a/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift +++ b/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift @@ -603,7 +603,7 @@ private final class SheetContent: CombinedComponent { } )).string } else { - timeString = "Anytime" + timeString = strings.SuggestPost_SetTimeFormat_Any } let timestampSection = timestampSection.update( @@ -618,7 +618,7 @@ private final class SheetContent: CombinedComponent { title: AnyComponent(VStack([ AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Time", + string: environment.strings.SuggestPost_SetTime_Label, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemPrimaryTextColor )), diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 1e3dc481c6..e4dea9326f 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -2379,6 +2379,12 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G funds = (amount, amount.currency == .stars ? Int(configuration.channelMessageSuggestionStarsCommissionPermille) : Int(configuration.channelMessageSuggestionTonCommissionPermille)) } + #if DEBUG + if "".isEmpty { + funds = nil + } + #endif + var isAdmin = false if let channel = strongSelf.presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.isMonoForum, let linkedMonoforumId = channel.linkedMonoforumId, let mainChannel = strongSelf.presentationInterfaceState.renderedPeer?.peers[linkedMonoforumId] as? TelegramChannel, mainChannel.hasPermission(.manageDirect) { isAdmin = true diff --git a/third-party/webrtc/BUILD b/third-party/webrtc/BUILD index 16f615376c..37837b1606 100644 --- a/third-party/webrtc/BUILD +++ b/third-party/webrtc/BUILD @@ -3061,7 +3061,7 @@ objc_library( "webrtc/rtc_base/system/gcd_helpers.m", ], copts = [ - "-Wno-all", + "-w", "-Ithird-party/webrtc/webrtc/", "-Ithird-party/webrtc/webrtc/sdk/objc", "-Ithird-party/webrtc/webrtc/sdk/objc/base", @@ -3124,7 +3124,7 @@ objc_library( module_name = "webrtc", srcs = combined_sources, copts = [ - "-Wno-all", + "-w", "-Ithird-party/webrtc/libsrtp/third_party/libsrtp/include", "-Ithird-party/webrtc/libsrtp/third_party/libsrtp/crypto/include", "-Ithird-party/webrtc/libsrtp",