mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Remove redundant local_user.auto_expand setting. (#5041)
- Fixes #4643 Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
This commit is contained in:
parent
9eee61dd06
commit
a65be776e3
@ -130,7 +130,6 @@ pub async fn save_user_settings(
|
||||
send_notifications_to_email: data.send_notifications_to_email,
|
||||
show_nsfw: data.show_nsfw,
|
||||
blur_nsfw: data.blur_nsfw,
|
||||
auto_expand: data.auto_expand,
|
||||
show_bot_accounts: data.show_bot_accounts,
|
||||
default_post_sort_type,
|
||||
default_comment_sort_type,
|
||||
|
@ -84,8 +84,8 @@ pub struct CaptchaResponse {
|
||||
pub struct SaveUserSettings {
|
||||
/// Show nsfw posts.
|
||||
pub show_nsfw: Option<bool>,
|
||||
/// Blur nsfw posts.
|
||||
pub blur_nsfw: Option<bool>,
|
||||
pub auto_expand: Option<bool>,
|
||||
/// Your user's theme.
|
||||
pub theme: Option<String>,
|
||||
/// The default post listing type, usually "local"
|
||||
|
@ -127,7 +127,6 @@ pub async fn import_settings(
|
||||
show_read_posts: data.settings.as_ref().map(|s| s.show_read_posts),
|
||||
open_links_in_new_tab: data.settings.as_ref().map(|s| s.open_links_in_new_tab),
|
||||
blur_nsfw: data.settings.as_ref().map(|s| s.blur_nsfw),
|
||||
auto_expand: data.settings.as_ref().map(|s| s.auto_expand),
|
||||
infinite_scroll_enabled: data.settings.as_ref().map(|s| s.infinite_scroll_enabled),
|
||||
post_listing_mode: data.settings.as_ref().map(|s| s.post_listing_mode),
|
||||
..Default::default()
|
||||
|
@ -459,7 +459,6 @@ diesel::table! {
|
||||
totp_2fa_secret -> Nullable<Text>,
|
||||
open_links_in_new_tab -> Bool,
|
||||
blur_nsfw -> Bool,
|
||||
auto_expand -> Bool,
|
||||
infinite_scroll_enabled -> Bool,
|
||||
admin -> Bool,
|
||||
post_listing_mode -> PostListingModeEnum,
|
||||
|
@ -49,7 +49,6 @@ pub struct LocalUser {
|
||||
/// Open links in a new tab.
|
||||
pub open_links_in_new_tab: bool,
|
||||
pub blur_nsfw: bool,
|
||||
pub auto_expand: bool,
|
||||
/// Whether infinite scroll is enabled.
|
||||
pub infinite_scroll_enabled: bool,
|
||||
/// Whether the person is an admin.
|
||||
@ -104,8 +103,6 @@ pub struct LocalUserInsertForm {
|
||||
#[new(default)]
|
||||
pub blur_nsfw: Option<bool>,
|
||||
#[new(default)]
|
||||
pub auto_expand: Option<bool>,
|
||||
#[new(default)]
|
||||
pub infinite_scroll_enabled: Option<bool>,
|
||||
#[new(default)]
|
||||
pub admin: Option<bool>,
|
||||
@ -143,7 +140,6 @@ pub struct LocalUserUpdateForm {
|
||||
pub totp_2fa_secret: Option<Option<String>>,
|
||||
pub open_links_in_new_tab: Option<bool>,
|
||||
pub blur_nsfw: Option<bool>,
|
||||
pub auto_expand: Option<bool>,
|
||||
pub infinite_scroll_enabled: Option<bool>,
|
||||
pub admin: Option<bool>,
|
||||
pub post_listing_mode: Option<PostListingMode>,
|
||||
|
@ -235,7 +235,6 @@ mod tests {
|
||||
person_id: inserted_sara_local_user.person_id,
|
||||
email: inserted_sara_local_user.email,
|
||||
show_nsfw: inserted_sara_local_user.show_nsfw,
|
||||
auto_expand: inserted_sara_local_user.auto_expand,
|
||||
blur_nsfw: inserted_sara_local_user.blur_nsfw,
|
||||
theme: inserted_sara_local_user.theme,
|
||||
default_post_sort_type: inserted_sara_local_user.default_post_sort_type,
|
||||
|
3
migrations/2024-09-23-133038_remove_auto_expand/down.sql
Normal file
3
migrations/2024-09-23-133038_remove_auto_expand/down.sql
Normal file
@ -0,0 +1,3 @@
|
||||
ALTER TABLE local_user
|
||||
ADD COLUMN auto_expand boolean NOT NULL DEFAULT FALSE;
|
||||
|
3
migrations/2024-09-23-133038_remove_auto_expand/up.sql
Normal file
3
migrations/2024-09-23-133038_remove_auto_expand/up.sql
Normal file
@ -0,0 +1,3 @@
|
||||
ALTER TABLE local_user
|
||||
DROP COLUMN auto_expand;
|
||||
|
Loading…
Reference in New Issue
Block a user