mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 05:08:03 +00:00
Change default to single column UI (#10847)
Keep current setting for users who were active within the last month
This commit is contained in:
parent
dee4f1878d
commit
738ad9759a
|
@ -31,7 +31,7 @@ defaults: &defaults
|
||||||
noindex: false
|
noindex: false
|
||||||
theme: 'default'
|
theme: 'default'
|
||||||
aggregate_reblogs: true
|
aggregate_reblogs: true
|
||||||
advanced_layout: true
|
advanced_layout: false
|
||||||
notification_emails:
|
notification_emails:
|
||||||
follow: false
|
follow: false
|
||||||
reblog: false
|
reblog: false
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
class PreserveOldLayoutForExistingUsers < ActiveRecord::Migration[5.2]
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def up
|
||||||
|
# Assume that currently active users are already using the layout that they
|
||||||
|
# want to use, therefore ensure that it is saved explicitly and not based
|
||||||
|
# on the to-be-changed default
|
||||||
|
|
||||||
|
User.where(User.arel_table[:current_sign_in_at].gteq(1.month.ago)).find_each do |user|
|
||||||
|
next if Setting.unscoped.where(thing_type: 'User', thing_id: user.id, var: 'advanced_layout').exists?
|
||||||
|
user.settings.advanced_layout = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2019_05_19_130537) do
|
ActiveRecord::Schema.define(version: 2019_05_29_143559) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
Loading…
Reference in a new issue