diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-07-08 21:57:14 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-07-08 21:58:03 +0300 |
commit | 307e267aea9f6ed8309c39a97dcb0d7eb115b8cd (patch) | |
tree | a05e1cc2619880141d46e90fb23bc82d1338f3d1 /pkg/models | |
parent | repology: verify all outdated entries are indeed outdated (diff) | |
download | soko-307e267aea9f6ed8309c39a97dcb0d7eb115b8cd.tar.gz soko-307e267aea9f6ed8309c39a97dcb0d7eb115b8cd.tar.bz2 soko-307e267aea9f6ed8309c39a97dcb0d7eb115b8cd.zip |
app/preferences: remove general
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'pkg/models')
-rw-r--r-- | pkg/models/userpreferences.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/pkg/models/userpreferences.go b/pkg/models/userpreferences.go index 0db7107..ed133c7 100644 --- a/pkg/models/userpreferences.go +++ b/pkg/models/userpreferences.go @@ -3,14 +3,9 @@ package models type UserPreferences struct { - General GeneralPreferences Maintainers MaintainersPreferences } -type GeneralPreferences struct { - LandingPageLayout string -} - type MaintainersPreferences struct { IncludeProjectPackages bool ExcludedProjects []string @@ -21,21 +16,10 @@ var AllArches = [...]string{"alpha", "amd64", "arm", "arm64", "hppa", "ia64", "m func GetDefaultUserPreferences() UserPreferences { userPreferences := UserPreferences{} - userPreferences.General = GeneralPreferences{} userPreferences.Maintainers = MaintainersPreferences{} - userPreferences.General.LandingPageLayout = "classic" - userPreferences.Maintainers.IncludeProjectPackages = false userPreferences.Maintainers.ExcludedProjects = []string{} return userPreferences } - -func (u *UserPreferences) Sanitize() { - defaultUserPreferences := GetDefaultUserPreferences() - - if !(u.General.LandingPageLayout == "classic" || u.General.LandingPageLayout == "full") { - u.General.LandingPageLayout = defaultUserPreferences.General.LandingPageLayout - } -} |