Fix friend request view bug

pull/14/head
Niels Andriesse 6 years ago
parent f8de85ac42
commit d91dc5f045

@ -25,6 +25,7 @@
init(kind: Kind) { init(kind: Kind) {
self.kind = kind self.kind = kind
super.init(frame: CGRect.zero) super.init(frame: CGRect.zero)
initialize()
} }
@objc convenience init?(rawKind: String) { @objc convenience init?(rawKind: String) {

@ -116,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN
} }
- (TSThreadFriendRequestState)friendRequestState { - (TSThreadFriendRequestState)friendRequestState {
return TSThreadFriendRequestStateRequestSent; return self.isIncoming ? TSThreadFriendRequestStateRequestReceived : TSThreadFriendRequestStateRequestSent;
// return self.message.thread.friendRequestState; // return self.message.thread.friendRequestState;
} }

@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
Set the `PreKeyBundle` for the given contact. Set the `PreKeyBundle` for the given contact.
@param bundle The pre key bundle. @param bundle The pre key bundle.
@param transaction A YapDatabaseReadWriteTransaction. @param transaction A `YapDatabaseReadWriteTransaction`.
@param pubKey The hex encoded public key of the contact. @param pubKey The hex encoded public key of the contact.
*/ */
- (void)setPreKeyBundle:(PreKeyBundle *)bundle forContact:(NSString *)pubKey transaction:(YapDatabaseReadWriteTransaction *)transaction; - (void)setPreKeyBundle:(PreKeyBundle *)bundle forContact:(NSString *)pubKey transaction:(YapDatabaseReadWriteTransaction *)transaction;
@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
Remove the `PreKeyBundle` for the given contact. Remove the `PreKeyBundle` for the given contact.
@param pubKey The hex encoded public key of the contact. @param pubKey The hex encoded public key of the contact.
@param transaction A YapDatabaseReadWriteTransaction. @param transaction A `YapDatabaseReadWriteTransaction`.
*/ */
- (void)removePreKeyBundleForContact:(NSString *)pubKey transaction:(YapDatabaseReadWriteTransaction *)transaction; - (void)removePreKeyBundleForContact:(NSString *)pubKey transaction:(YapDatabaseReadWriteTransaction *)transaction;

@ -1,3 +1,4 @@
@objc public extension SSKProtoPrekeyBundleMessage { @objc public extension SSKProtoPrekeyBundleMessage {
private var accountManager: TSAccountManager { private var accountManager: TSAccountManager {

@ -1,4 +1,5 @@
public extension TSOutgoingMessage {
@objc public extension TSOutgoingMessage {
/// Loki: This is a message used to establish sessions /// Loki: This is a message used to establish sessions
@objc public static func emptyOutgoingMessage(inThread thread: TSThread) -> TSOutgoingMessage { @objc public static func emptyOutgoingMessage(inThread thread: TSThread) -> TSOutgoingMessage {

Loading…
Cancel
Save