Unify avatar class generation

This commit is contained in:
Zed
2022-01-14 03:16:09 +01:00
parent cc0e4b1668
commit 888e965f41
4 changed files with 15 additions and 11 deletions

View File

@@ -88,3 +88,9 @@ proc getTabClass*(query: Query; tab: QueryKind): string =
result = "tab-item"
if query.kind == tab:
result &= " active"
proc getAvatarClass*(prefs: Prefs): string =
if prefs.squareAvatars:
"avatar"
else:
"avatar round"