Various improvements

This commit is contained in:
Ilya Laktyushin
2024-10-09 00:05:41 +04:00
parent 059af7d697
commit 89e3ae02a2
51 changed files with 1305 additions and 660 deletions

View File

@@ -50,6 +50,7 @@ final class ChatListSearchPaneWrapper {
public enum ChatListSearchPaneKey {
case chats
case topics
case publicPosts
case channels
case apps
case media
@@ -67,6 +68,8 @@ extension ChatListSearchPaneKey {
return .chats
case .topics:
return .topics
case .publicPosts:
return .publicPosts
case .channels:
return .channels
case .apps:
@@ -87,13 +90,16 @@ extension ChatListSearchPaneKey {
}
}
func defaultAvailableSearchPanes(isForum: Bool, hasDownloads: Bool) -> [ChatListSearchPaneKey] {
func defaultAvailableSearchPanes(isForum: Bool, hasDownloads: Bool, hasPublicPosts: Bool) -> [ChatListSearchPaneKey] {
var result: [ChatListSearchPaneKey] = []
if isForum {
result.append(.topics)
} else {
result.append(.chats)
}
if hasPublicPosts {
result.append(.publicPosts)
}
result.append(.channels)
result.append(.apps)
result.append(contentsOf: [.media, .downloads, .links, .files, .music, .voice])