session-ios/SessionMessagingKit/Sending & Receiving/Read Tracking/OWSReadTracking.h
Morgan Pretty 1b3f6c0ca6 Minor tweaks to the message request banner on the HomeVC
Fixed the unread message counting for message requests
Updated the message request banner to indicate the number of message requests with an unread message
Updated the message request banner to automatically disappear if the user has no unread message requests
Renamed a variable for ReadReceipt management to make it a bit more self-documenting (it looked like it would trigger a read receipt to be sent regardless of the setting)
2022-03-01 17:25:53 +11:00

38 lines
954 B
Objective-C

//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@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;
@property (nonatomic, readonly) uint64_t expireStartedAt;
@property (nonatomic, readonly) uint64_t sortId;
@property (nonatomic, readonly) NSString *uniqueThreadId;
- (BOOL)shouldAffectUnreadCounts;
/**
* Used both for *responding* to a remote read receipt and in response to the local user's activity.
*/
- (void)markAsReadAtTimestamp:(uint64_t)readTimestamp
trySendReadReceipt:(BOOL)trySendReadReceipt
transaction:(YapDatabaseReadWriteTransaction *)transaction;
@end
NS_ASSUME_NONNULL_END