mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: reuse mergedPreferences/fullGroupPreferences for determining prohibited features and creating chat items instead of re-calculating (#1417)
This commit is contained in:
@@ -552,9 +552,10 @@ prefEnabledToText = \case
|
||||
PrefEnabled {forUser = True, forContact = False} -> "enabled for you"
|
||||
PrefEnabled {forUser = False, forContact = True} -> "enabled for contact"
|
||||
|
||||
contactUserPreferences' :: User -> Contact -> ContactUserPreferences
|
||||
contactUserPreferences' user ct =
|
||||
contactUserPreferences user (userPreferences ct) (preferences' ct) (contactConnIncognito ct)
|
||||
updateMergedPreferences :: User -> Contact -> Contact
|
||||
updateMergedPreferences user ct =
|
||||
let mergedPreferences = contactUserPreferences user (userPreferences ct) (preferences' ct) (contactConnIncognito ct)
|
||||
in ct {mergedPreferences}
|
||||
|
||||
contactUserPreferences :: User -> Preferences -> Maybe Preferences -> Bool -> ContactUserPreferences
|
||||
contactUserPreferences user userPreferences contactPreferences connectedIncognito =
|
||||
|
||||
Reference in New Issue
Block a user