Various improvements

This commit is contained in:
Isaac
2025-06-05 19:09:18 +08:00
parent 40b770dde8
commit b5c3d6f34f
14 changed files with 248 additions and 123 deletions

View File

@@ -416,10 +416,22 @@ public final class ChatLoadingPlaceholderNode: ASDisplayNode {
} else if peer is TelegramGroup {
chatType = .group
} else if let channel = peer as? TelegramChannel {
if case .group = channel.info {
chatType = .group
if channel.isMonoForum {
if let mainChannel = chatPresentationInterfaceState.renderedPeer?.chatOrMonoforumMainPeer as? TelegramChannel, mainChannel.hasPermission(.sendSomething) {
if chatPresentationInterfaceState.chatLocation.threadId == nil {
chatType = .group
} else {
chatType = .user
}
} else {
chatType = .user
}
} else {
chatType = .channel
if case .group = channel.info {
chatType = .group
} else {
chatType = .channel
}
}
}
}