1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-09-18 21:38:48 +00:00

Cache user information

This commit is contained in:
2019-04-24 11:24:05 +02:00
parent b71a8ae6bb
commit de1ef7fd6d
9 changed files with 194 additions and 1 deletions

View File

@@ -3,3 +3,12 @@
/// @author Pierre HUBERT
enum UserPageVisibility { PRIVATE, PUBLIC, OPEN }
/// Find the visibility level matching a string
UserPageVisibility userPageVisibilityFromString(String str) {
for (int i = 0; i < UserPageVisibility.values.length; i++)
if (UserPageVisibility.values[i].toString() == str)
return UserPageVisibility.values[i];
throw "$str is not a valid user page visibility level!";
}