From 0fc9332499de7b4ae70b7f8c34f0229164224ebd Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 19 Feb 2021 15:33:34 +0400 Subject: [PATCH 1/2] Remove unnecessary string --- Telegram/SiriIntents/ar.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/be.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/ca.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/de.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/en.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/es.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/fa.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/fr.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/id.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/it.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/ko.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/ms.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/nl.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/pl.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/pt.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/ru.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/tr.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/uk.lproj/Intents.intentdefinition | 4 ---- Telegram/SiriIntents/uz.lproj/Intents.intentdefinition | 4 ---- 19 files changed, 76 deletions(-) diff --git a/Telegram/SiriIntents/ar.lproj/Intents.intentdefinition b/Telegram/SiriIntents/ar.lproj/Intents.intentdefinition index 0fff54b0b0..ffdcdee75b 100644 --- a/Telegram/SiriIntents/ar.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/ar.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/be.lproj/Intents.intentdefinition b/Telegram/SiriIntents/be.lproj/Intents.intentdefinition index 761ea32065..f8efe8413d 100644 --- a/Telegram/SiriIntents/be.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/be.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/ca.lproj/Intents.intentdefinition b/Telegram/SiriIntents/ca.lproj/Intents.intentdefinition index a61dad51cd..885ea40e2f 100644 --- a/Telegram/SiriIntents/ca.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/ca.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/de.lproj/Intents.intentdefinition b/Telegram/SiriIntents/de.lproj/Intents.intentdefinition index 6b3b342580..523e5b6d9a 100644 --- a/Telegram/SiriIntents/de.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/de.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/en.lproj/Intents.intentdefinition b/Telegram/SiriIntents/en.lproj/Intents.intentdefinition index bcd40d6ded..c0eb259e7c 100644 --- a/Telegram/SiriIntents/en.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/en.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/es.lproj/Intents.intentdefinition b/Telegram/SiriIntents/es.lproj/Intents.intentdefinition index cd4075dbe6..9d1a5b6144 100644 --- a/Telegram/SiriIntents/es.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/es.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/fa.lproj/Intents.intentdefinition b/Telegram/SiriIntents/fa.lproj/Intents.intentdefinition index 25c7c7daee..40e3e505b9 100644 --- a/Telegram/SiriIntents/fa.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/fa.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/fr.lproj/Intents.intentdefinition b/Telegram/SiriIntents/fr.lproj/Intents.intentdefinition index d9698117d9..3921f4e979 100644 --- a/Telegram/SiriIntents/fr.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/fr.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/id.lproj/Intents.intentdefinition b/Telegram/SiriIntents/id.lproj/Intents.intentdefinition index 42ee06d5f3..5c525a0b4d 100644 --- a/Telegram/SiriIntents/id.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/id.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/it.lproj/Intents.intentdefinition b/Telegram/SiriIntents/it.lproj/Intents.intentdefinition index 9d5f6f4dc2..9ab35d4799 100644 --- a/Telegram/SiriIntents/it.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/it.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/ko.lproj/Intents.intentdefinition b/Telegram/SiriIntents/ko.lproj/Intents.intentdefinition index c6bd3ca392..2124ecec75 100644 --- a/Telegram/SiriIntents/ko.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/ko.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/ms.lproj/Intents.intentdefinition b/Telegram/SiriIntents/ms.lproj/Intents.intentdefinition index c0890bb8b2..d0e289c00a 100644 --- a/Telegram/SiriIntents/ms.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/ms.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/nl.lproj/Intents.intentdefinition b/Telegram/SiriIntents/nl.lproj/Intents.intentdefinition index 3dfcc55755..e920c7ad07 100644 --- a/Telegram/SiriIntents/nl.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/nl.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/pl.lproj/Intents.intentdefinition b/Telegram/SiriIntents/pl.lproj/Intents.intentdefinition index 7f167514bd..35e0c54c6b 100644 --- a/Telegram/SiriIntents/pl.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/pl.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/pt.lproj/Intents.intentdefinition b/Telegram/SiriIntents/pt.lproj/Intents.intentdefinition index 3620ca8af2..f3efb58eb0 100644 --- a/Telegram/SiriIntents/pt.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/pt.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/ru.lproj/Intents.intentdefinition b/Telegram/SiriIntents/ru.lproj/Intents.intentdefinition index b4bb3318b8..353db11d9a 100644 --- a/Telegram/SiriIntents/ru.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/ru.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/tr.lproj/Intents.intentdefinition b/Telegram/SiriIntents/tr.lproj/Intents.intentdefinition index 557205d797..da55cf59a0 100644 --- a/Telegram/SiriIntents/tr.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/tr.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/uk.lproj/Intents.intentdefinition b/Telegram/SiriIntents/uk.lproj/Intents.intentdefinition index 619acbc559..1dae27cf79 100644 --- a/Telegram/SiriIntents/uk.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/uk.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration diff --git a/Telegram/SiriIntents/uz.lproj/Intents.intentdefinition b/Telegram/SiriIntents/uz.lproj/Intents.intentdefinition index 1ba76570ff..d74bf5f9dc 100644 --- a/Telegram/SiriIntents/uz.lproj/Intents.intentdefinition +++ b/Telegram/SiriIntents/uz.lproj/Intents.intentdefinition @@ -74,10 +74,6 @@ INIntentParameterPromptDialogCustom - INIntentParameterPromptDialogFormatString - Search - INIntentParameterPromptDialogFormatStringID - ORCbLf INIntentParameterPromptDialogType Configuration From e14021c001bbefb173373e6ecdae93d7a20e8a1e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 19 Feb 2021 15:33:55 +0400 Subject: [PATCH 2/2] Filter admin log empty admin rights --- .../Sources/ChatRecentActionsHistoryTransition.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift index 581030ac37..1197ebff43 100644 --- a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift +++ b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift @@ -705,8 +705,8 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { } } else if case let .member(_, _, prevAdminRights, _, prevRank) = prev.participant { if case let .member(_, _, newAdminRights, _, newRank) = new.participant { - let prevFlags = prevAdminRights?.rights.rights ?? [] - let newFlags = newAdminRights?.rights.rights ?? [] + var prevFlags = prevAdminRights?.rights.rights ?? [] + var newFlags = newAdminRights?.rights.rights ?? [] let order: [(TelegramChatAdminRightsFlags, String)] @@ -721,6 +721,8 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { (.canAddAdmins, self.presentationData.strings.Channel_AdminLog_CanAddAdmins), (.canManageCalls, self.presentationData.strings.Channel_AdminLog_CanManageCalls) ] + prevFlags = prevFlags.intersection(TelegramChatAdminRightsFlags.broadcastSpecific) + newFlags = newFlags.intersection(TelegramChatAdminRightsFlags.broadcastSpecific) } else { order = [ (.canChangeInfo, self.presentationData.strings.Channel_AdminLog_CanChangeInfo), @@ -732,6 +734,8 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { (.canAddAdmins, self.presentationData.strings.Channel_AdminLog_CanAddAdmins), (.canManageCalls, self.presentationData.strings.Channel_AdminLog_CanManageCalls) ] + prevFlags = prevFlags.intersection(TelegramChatAdminRightsFlags.groupSpecific) + newFlags = newFlags.intersection(TelegramChatAdminRightsFlags.groupSpecific) } if prevFlags.isEmpty && newFlags.isEmpty && (prevAdminRights != nil) != (newAdminRights != nil) {