mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-23 19:36:26 +02:00
4647310322
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.
58 lines
1.3 KiB
Objective-C
58 lines
1.3 KiB
Objective-C
#import "TGMessageViewFooterController.h"
|
|
|
|
#import <WatchCommonWatch/WatchCommonWatch.h>
|
|
|
|
#import "TGWatchCommon.h"
|
|
#import "TGDateUtils.h"
|
|
|
|
NSString *const TGMessageViewFooterIdentifier = @"TGMessageViewFooter";
|
|
|
|
@implementation TGMessageViewFooterController
|
|
|
|
- (void)updateWithMessage:(TGBridgeMessage *)message channel:(bool)channel
|
|
{
|
|
self.dateLabel.text = [TGDateUtils stringForFullDate:message.date];
|
|
self.timeLabel.text = [TGDateUtils stringForShortTime:message.date];
|
|
|
|
self.forwardLabel.text = TGLocalized(@"Watch.MessageView.Forward");
|
|
self.replyLabel.text = TGLocalized(@"Watch.MessageView.Reply");
|
|
self.viewLabel.text = TGLocalized(@"Watch.MessageView.ViewOnPhone");
|
|
|
|
if (channel)
|
|
{
|
|
self.forwardButton.hidden = true;
|
|
self.replyButton.hidden = true;
|
|
}
|
|
}
|
|
|
|
- (IBAction)forwardButtonPressedAction
|
|
{
|
|
if (self.forwardPressed != nil)
|
|
self.forwardPressed();
|
|
}
|
|
|
|
- (IBAction)replyButtonPressedAction
|
|
{
|
|
if (self.replyPressed != nil)
|
|
self.replyPressed();
|
|
}
|
|
|
|
- (IBAction)replyWithoutPresetButtonPressedAction
|
|
{
|
|
if (self.replyWithoutPresetPressed != nil)
|
|
self.replyWithoutPresetPressed();
|
|
}
|
|
|
|
- (IBAction)viewButtonPressedAction
|
|
{
|
|
if (self.viewPressed != nil)
|
|
self.viewPressed();
|
|
}
|
|
|
|
+ (NSString *)identifier
|
|
{
|
|
return TGMessageViewFooterIdentifier;
|
|
}
|
|
|
|
@end
|