Files
GLEGram-iOS/submodules/LegacyComponents/Sources/TGMessageGroup.m
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

33 lines
1.0 KiB
Objective-C

#import <LegacyComponents/TGMessageGroup.h>
@implementation TGMessageGroup
- (instancetype)initWithMinId:(int32_t)minId minTimestamp:(int32_t)minTimestamp maxId:(int32_t)maxId maxTimestamp:(int32_t)maxTimestamp count:(int32_t)count {
self = [super init];
if (self != nil) {
_minId = minId;
_minTimestamp = minTimestamp;
_maxId = maxId;
_maxTimestamp = maxTimestamp;
_count = count;
}
return self;
}
- (bool)isEqual:(id)object {
return [object isKindOfClass:[TGMessageGroup class]] && ((TGMessageGroup *)object)->_minId == _minId && ((TGMessageGroup *)object)->_maxId == _maxId && ((TGMessageGroup *)object)->_maxTimestamp == _maxTimestamp && ((TGMessageGroup *)object)->_count == _count;
}
- (NSString *)description {
return [[NSString alloc] initWithFormat:@"(%d...%d at %d)", _minId, _maxId, _maxTimestamp];
}
- (bool)intersects:(TGMessageGroup *)other {
if (other == nil)
return false;
return _minId <= other.maxId && _maxId >= other.minId;
}
@end