2021-05-04 17:09:56 +03:00
|
|
|
/**
|
|
|
|
* @copyright Copyright (c) 2020 Ivan Sein <ivan@nextcloud.com>
|
|
|
|
*
|
|
|
|
* @author Ivan Sein <ivan@nextcloud.com>
|
|
|
|
*
|
|
|
|
* @license GNU GPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <MapKit/MapKit.h>
|
|
|
|
#import "ChatTableViewCell.h"
|
|
|
|
#import "GeoLocationRichObject.h"
|
|
|
|
#import "MessageBodyTextView.h"
|
|
|
|
#import "NCChatMessage.h"
|
|
|
|
|
|
|
|
static CGFloat kLocationMessageCellMinimumHeight = 50.0;
|
|
|
|
static CGFloat kLocationMessageCellPreviewWidth = 240.0;
|
|
|
|
static CGFloat kLocationMessageCellPreviewHeight = 120.0;
|
|
|
|
|
|
|
|
static NSString *LocationMessageCellIdentifier = @"LocationMessageCellIdentifier";
|
|
|
|
static NSString *GroupedLocationMessageCellIdentifier = @"GroupedLocationMessageCellIdentifier";
|
|
|
|
|
2023-04-17 14:15:31 +03:00
|
|
|
@class AvatarButton;
|
2021-05-04 17:09:56 +03:00
|
|
|
@class LocationMessageTableViewCell;
|
2023-10-15 18:53:33 +03:00
|
|
|
@class ReactionsView;
|
|
|
|
@protocol ReactionsViewDelegate;
|
2021-05-04 17:09:56 +03:00
|
|
|
|
2021-10-25 19:41:38 +03:00
|
|
|
@protocol LocationMessageTableViewCellDelegate <ChatTableViewCellDelegate>
|
2021-05-04 17:09:56 +03:00
|
|
|
|
|
|
|
- (void)cellWantsToOpenLocation:(GeoLocationRichObject *)geoLocationRichObject;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2022-04-06 18:43:31 +03:00
|
|
|
@interface LocationMessageTableViewCell : ChatTableViewCell <ReactionsViewDelegate>
|
2021-05-04 17:09:56 +03:00
|
|
|
|
|
|
|
@property (nonatomic, weak) id<LocationMessageTableViewCellDelegate> delegate;
|
|
|
|
|
|
|
|
@property (nonatomic, strong) UILabel *titleLabel;
|
|
|
|
@property (nonatomic, strong) UILabel *dateLabel;
|
|
|
|
@property (nonatomic, strong) UIImageView *previewImageView;
|
|
|
|
@property (nonatomic, strong) MessageBodyTextView *bodyTextView;
|
2023-04-17 14:15:31 +03:00
|
|
|
@property (nonatomic, strong) AvatarButton *avatarButton;
|
2021-05-04 17:09:56 +03:00
|
|
|
@property (nonatomic, strong) UIView *statusView;
|
|
|
|
@property (nonatomic, strong) GeoLocationRichObject *geoLocationRichObject;
|
2022-04-05 15:47:43 +03:00
|
|
|
@property (nonatomic, strong) ReactionsView *reactionsView;
|
|
|
|
@property (nonatomic, strong) NSArray<NSLayoutConstraint *> *vConstraints;
|
|
|
|
@property (nonatomic, strong) NSArray<NSLayoutConstraint *> *vGroupedConstraints;
|
2021-05-04 17:09:56 +03:00
|
|
|
|
|
|
|
+ (CGFloat)defaultFontSize;
|
|
|
|
- (void)setupForMessage:(NCChatMessage *)message withLastCommonReadMessage:(NSInteger)lastCommonRead;
|
|
|
|
|
|
|
|
@end
|