Files
GLEGram-iOS/submodules/Postbox/Sources/ChatListHolesView.swift
T
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

65 lines
1.6 KiB
Swift

import Foundation
public struct ChatListHolesEntry: Hashable {
public let groupId: PeerGroupId
public let hole: ChatListHole
public init(groupId: PeerGroupId, hole: ChatListHole) {
self.groupId = groupId
self.hole = hole
}
}
final class MutableChatListHolesView {
fileprivate var entries = Set<ChatListHolesEntry>()
func update(holes: Set<ChatListHolesEntry>) -> Bool {
if self.entries != holes {
self.entries = holes
return true
} else {
return false
}
}
}
public final class ChatListHolesView {
public let entries: Set<ChatListHolesEntry>
init(_ mutableView: MutableChatListHolesView) {
self.entries = mutableView.entries
}
}
public struct ForumTopicListHolesEntry: Hashable {
public let peerId: PeerId
public let index: StoredPeerThreadCombinedState.Index?
public init(peerId: PeerId, index: StoredPeerThreadCombinedState.Index?) {
self.peerId = peerId
self.index = index
}
}
final class MutableForumTopicListHolesView {
fileprivate var entries = Set<ForumTopicListHolesEntry>()
func update(holes: Set<ForumTopicListHolesEntry>) -> Bool {
if self.entries != holes {
self.entries = holes
return true
} else {
return false
}
}
}
public final class ForumTopicListHolesView {
public let entries: Set<ForumTopicListHolesEntry>
init(_ mutableView: MutableForumTopicListHolesView) {
self.entries = mutableView.entries
}
}