]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/lib.rs
Merge branch 'main' into feature/mark_post_as_read
[lemmy.git] / crates / api_common / src / lib.rs
index 47f4752dd489acaafe3c0f82831fb4f87501d7e0..f2b41be50c8c027e619b4c93d4e7ac95bec07a67 100644 (file)
@@ -237,30 +237,6 @@ pub fn is_admin(local_user_view: &LocalUserView) -> Result<(), LemmyError> {
   Ok(())
 }
 
-/// A helper method for showing the bot account
-pub fn user_show_bot_accounts(local_user_view: &Option<LocalUserView>) -> bool {
-  match local_user_view {
-    Some(uv) => uv.to_owned().local_user.show_bot_accounts,
-    None => true,
-  }
-}
-
-/// A helper method for showing nsfw
-pub fn user_show_nsfw(local_user_view: &Option<LocalUserView>) -> bool {
-  match &local_user_view {
-    Some(uv) => uv.local_user.show_nsfw,
-    None => false,
-  }
-}
-
-/// A helper method for showing read posts
-pub fn user_show_read_posts(local_user_view: &Option<LocalUserView>) -> bool {
-  match local_user_view {
-    Some(uv) => uv.to_owned().local_user.show_read_posts,
-    None => true,
-  }
-}
-
 pub async fn get_post(post_id: PostId, pool: &DbPool) -> Result<Post, LemmyError> {
   blocking(pool, move |conn| Post::read(conn, post_id))
     .await?