2017-02-07 21:09:04 +01:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
@class YapDatabaseReadWriteTransaction;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Some interactions track read/unread status.
|
|
|
|
* e.g. incoming messages and call notifications
|
|
|
|
*/
|
|
|
|
@protocol OWSReadTracking <NSObject>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Has the local user seen the interaction?
|
|
|
|
*/
|
|
|
|
@property (nonatomic, readonly, getter=wasRead) BOOL read;
|
|
|
|
|
2017-08-31 17:49:21 +02:00
|
|
|
@property (nonatomic, readonly) uint64_t timestampForSorting;
|
2017-05-25 18:17:45 +02:00
|
|
|
@property (nonatomic, readonly) NSString *uniqueThreadId;
|
|
|
|
|
|
|
|
- (BOOL)shouldAffectUnreadCounts;
|
|
|
|
|
2017-02-07 21:09:04 +01:00
|
|
|
/**
|
2017-06-12 17:51:25 +02:00
|
|
|
* Used for *responding* to a remote read receipt or in response to user activity.
|
2017-02-07 21:09:04 +01:00
|
|
|
*/
|
2017-06-12 19:29:17 +02:00
|
|
|
- (void)markAsReadWithTransaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
sendReadReceipt:(BOOL)sendReadReceipt
|
|
|
|
updateExpiration:(BOOL)updateExpiration;
|
2017-02-07 21:09:04 +01:00
|
|
|
|
|
|
|
@end
|