Fix conversation input.

This commit is contained in:
Mikunj Varsani
2019-11-13 16:05:37 +11:00
parent 9c243eed75
commit a90b0e70f5
2 changed files with 22 additions and 20 deletions

View File

@@ -185,10 +185,3 @@ fun hasPendingFriendRequestWithAnyLinkedDevice(context: Context, recipient: Reci
false
}
}
fun shouldEnableUserInput(context: Context, recipient: Recipient): Promise<Boolean, Exception> {
// Input should be enabled if we don't have any pending requests OR we're friends with any linked device
return hasPendingFriendRequestWithAnyLinkedDevice(context, recipient).bind { hasPendingFriendRequest ->
if (!hasPendingFriendRequest) Promise.of(true) else isFriendsWithAnyLinkedDevice(context, recipient)
}.recover { true }
}