namespace decePubClient.Models.Types { /// How the persona's cards show media (Mastodon's reading:expand:media, set through /clientapi): Default hides /// what its author marked sensitive, ShowAll shows everything, HideAll hides every picture, video and sound behind a /// button. public enum ExpandMedia { Default = 1, ShowAll, HideAll } /// ExpandMedia as PrivaPub names it ("default", "show_all", "hide_all"). public static class ExpandMediaModes { public static ExpandMedia Of(string mode) => mode switch { "show_all" => ExpandMedia.ShowAll, "hide_all" => ExpandMedia.HideAll, _ => ExpandMedia.Default }; public static string Name(ExpandMedia mode) => mode switch { ExpandMedia.ShowAll => "show_all", ExpandMedia.HideAll => "hide_all", _ => "default" }; } }