ui: group history preference, enable in new groups by default; core: create group history feature items (#3596)

* Revert "core: do not create group history item (#3586)"

This reverts commit 2834b192ce.

* ios: group history preference

* fix tests

* android

* texts

* enable in new groups ios

* enable in new groups android

* android texts

* ios texts

* remove ellipsis

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
spaced4ndy
2023-12-29 21:46:28 +04:00
committed by GitHub
parent 9c061508a4
commit 05b55d3fb5
15 changed files with 98 additions and 48 deletions
+4 -6
View File
@@ -184,19 +184,17 @@ groupFeatureAllowed' :: GroupFeatureI f => SGroupFeature f -> FullGroupPreferenc
groupFeatureAllowed' feature prefs =
getField @"enable" (getGroupPreference feature prefs) == FEOn
allGroupFeatureItems :: [AGroupFeature]
allGroupFeatureItems =
allGroupFeatures :: [AGroupFeature]
allGroupFeatures =
[ AGF SGFTimedMessages,
AGF SGFDirectMessages,
AGF SGFFullDelete,
AGF SGFReactions,
AGF SGFVoice,
AGF SGFFiles
AGF SGFFiles,
AGF SGFHistory
]
allGroupFeatures :: [AGroupFeature]
allGroupFeatures = allGroupFeatureItems <> [AGF SGFHistory]
groupPrefSel :: SGroupFeature f -> GroupPreferences -> Maybe (GroupFeaturePreference f)
groupPrefSel f ps = case f of
SGFTimedMessages -> ps.timedMessages