session-ios/SignalMessaging/Models/TSUnreadIndicatorInteraction.m
Michael Kirk a58f1f385c Share a photo from photos app
Shows the conversation picker, and sends the attachment to that
conversation.

There's still a lot TODO

-[ ] resolve JSQ dependency
-[ ] properly wait for app to load
-[ ] dismiss share extension after send is complete
-[ ] support non jpeg file types
-[ ] Fix device sleep manager

// FREEBIE
2017-12-07 10:13:06 -05:00

61 lines
1.3 KiB
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "TSUnreadIndicatorInteraction.h"
NS_ASSUME_NONNULL_BEGIN
@interface TSUnreadIndicatorInteraction ()
@property (atomic) BOOL hasMoreUnseenMessages;
@end
#pragma mark -
@implementation TSUnreadIndicatorInteraction
- (instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (instancetype)initWithTimestamp:(uint64_t)timestamp
thread:(TSThread *)thread
hasMoreUnseenMessages:(BOOL)hasMoreUnseenMessages
missingUnseenSafetyNumberChangeCount:(NSUInteger)missingUnseenSafetyNumberChangeCount
{
self = [super initWithTimestamp:timestamp inThread:thread];
if (!self) {
return self;
}
_hasMoreUnseenMessages = hasMoreUnseenMessages;
_missingUnseenSafetyNumberChangeCount = missingUnseenSafetyNumberChangeCount;
return self;
}
- (BOOL)shouldUseReceiptDateForSorting
{
// Use the timestamp, not the "received at" timestamp to sort,
// since we're creating these interactions after the fact and back-dating them.
return NO;
}
- (BOOL)isDynamicInteraction
{
return YES;
}
- (OWSInteractionType)interactionType
{
return OWSInteractionType_UnreadIndicator;
}
@end
NS_ASSUME_NONNULL_END