mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 04:48:51 +00:00
15 lines
439 B
Dart
15 lines
439 B
Dart
/// User page visibility
|
|
///
|
|
/// @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!";
|
|
}
|