ios, android: show send direct message button only for active members (#1554)

This commit is contained in:
JRoberts
2022-12-12 15:27:52 +04:00
committed by GitHub
parent e347f5329c
commit a4ecb41743
9 changed files with 43 additions and 40 deletions
+4 -4
View File
@@ -120,12 +120,12 @@ contactConnId = aConnId . contactConn
contactConnIncognito :: Contact -> Bool
contactConnIncognito = connIncognito . contactConn
directContact :: Contact -> Bool
directContact Contact {contactUsed, activeConn = Connection {connLevel, viaGroupLink}} =
directOrUsed :: Contact -> Bool
directOrUsed Contact {contactUsed, activeConn = Connection {connLevel, viaGroupLink}} =
(connLevel == 0 && not viaGroupLink) || contactUsed
anyDirectContact :: Contact -> Bool
anyDirectContact Contact {contactUsed, activeConn = Connection {connLevel}} = connLevel == 0 || contactUsed
anyDirectOrUsed :: Contact -> Bool
anyDirectOrUsed Contact {contactUsed, activeConn = Connection {connLevel}} = connLevel == 0 || contactUsed
contactSecurityCode :: Contact -> Maybe SecurityCode
contactSecurityCode Contact {activeConn} = connectionCode activeConn