mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various Fixes
This commit is contained in:
parent
0e4ee6e057
commit
e379dca5e9
@ -398,7 +398,7 @@ private enum ChatListFilterPresetEntry: ItemListNodeEntry {
|
||||
arguments.deleteIncludePeer(id)
|
||||
})
|
||||
case let .excludePeer(_, peer, isRevealed):
|
||||
return ItemListPeerItem(presentationData: presentationData, dateTimeFormat: PresentationDateTimeFormat(timeFormat: .regular, dateFormat: .monthFirst, dateSeparator: ".", decimalSeparator: ".", groupingSeparator: "."), nameDisplayOrder: .firstLast, context: arguments.context, peer: peer.chatMainPeer!, height: .peerList, presence: nil, text: .none, label: .none, editing: ItemListPeerItemEditing(editable: true, editing: false, revealed: isRevealed), revealOptions: ItemListPeerItemRevealOptions(options: [ItemListPeerItemRevealOption(type: .destructive, title: presentationData.strings.Common_Delete, action: {
|
||||
return ItemListPeerItem(presentationData: presentationData, dateTimeFormat: PresentationDateTimeFormat(timeFormat: .regular, dateFormat: .monthFirst, dateSeparator: ".", decimalSeparator: ".", groupingSeparator: "."), nameDisplayOrder: .firstLast, context: arguments.context, peer: peer.chatMainPeer!, height: .peerList, aliasHandling: .threatSelfAsSaved, presence: nil, text: .none, label: .none, editing: ItemListPeerItemEditing(editable: true, editing: false, revealed: isRevealed), revealOptions: ItemListPeerItemRevealOptions(options: [ItemListPeerItemRevealOption(type: .destructive, title: presentationData.strings.Common_Delete, action: {
|
||||
arguments.deleteExcludePeer(peer.peerId)
|
||||
})]), switchValue: nil, enabled: true, selectable: false, sectionId: self.section, action: nil, setPeerIdWithRevealedOptions: { lhs, rhs in
|
||||
arguments.setItemIdWithRevealedOptions(lhs.flatMap { .peer($0) }, rhs.flatMap { .peer($0) })
|
||||
|
@ -35,11 +35,7 @@ NumberPluralizationForm numberPluralizationForm(unsigned int lc, int n) {
|
||||
|
||||
// set4
|
||||
case 0x6265: // be
|
||||
case 0x6273: // bs
|
||||
case 0x6872: // hr
|
||||
case 0x7275: // ru
|
||||
case 0x7368: // sh
|
||||
case 0x7372: // sr
|
||||
case 0x756b: // uk
|
||||
if (((n % 10) == 1) && ((n % 100) != 11)) // n mod 10 is 1 and n mod 100 is not 11
|
||||
return NumberPluralizationFormOne;
|
||||
@ -48,6 +44,19 @@ NumberPluralizationForm numberPluralizationForm(unsigned int lc, int n) {
|
||||
if (((n % 10) == 0) || (((n % 10) >= 5 && (n % 10) <= 9)) || (((n % 100) >= 11 && (n % 100) <= 14))) // n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
|
||||
return NumberPluralizationFormMany;
|
||||
break;
|
||||
|
||||
// set4 - bugfix
|
||||
case 0x6273: // bs
|
||||
case 0x6872: // hr
|
||||
case 0x7368: // sh
|
||||
case 0x7372: // sr
|
||||
if (((n % 10) == 1) && ((n % 100) != 11)) // n mod 10 is 1 and n mod 100 is not 11
|
||||
return NumberPluralizationFormOne;
|
||||
if ((((n % 10) >= 2 && (n % 10) <= 4)) && (((n % 100) < 12 || (n % 100) > 14))) // n mod 10 in 2..4 and n mod 100 not in 12..14
|
||||
return NumberPluralizationFormFew;
|
||||
if (((n % 10) == 0) || (((n % 10) >= 5 && (n % 10) <= 9)) || (((n % 100) >= 11 && (n % 100) <= 14))) // n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
|
||||
return NumberPluralizationFormOther;
|
||||
break;
|
||||
|
||||
// set5
|
||||
case 0x6b7368: // ksh
|
||||
|
@ -58,6 +58,12 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
|
||||
self?.interaction.toggleMembersSearch(false)
|
||||
}
|
||||
|
||||
self.searchBar.tokensUpdated = { [weak self] tokens in
|
||||
if tokens.isEmpty {
|
||||
self?.interaction.toggleMembersSearch(false)
|
||||
}
|
||||
}
|
||||
|
||||
if let statuses = interaction.statuses {
|
||||
self.searchingActivityDisposable = (statuses.searching
|
||||
|> deliverOnMainQueue).start(next: { [weak self] value in
|
||||
|
@ -473,7 +473,7 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen
|
||||
))
|
||||
case let .user(userPeerId, secretChatId, kind):
|
||||
let groupsInCommon: GroupsInCommonContext?
|
||||
if case .user = kind {
|
||||
if [.user, .bot].contains(kind) {
|
||||
groupsInCommon = GroupsInCommonContext(account: context.account, peerId: userPeerId)
|
||||
} else {
|
||||
groupsInCommon = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user