Revert
This commit is contained in:
parent
bff9abcb89
commit
fe9a89d68c
@ -99,8 +99,9 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def current_theme
|
||||
return Setting.theme
|
||||
current_user.setting_theme
|
||||
'light'
|
||||
# : todo :
|
||||
# current_user.setting_theme
|
||||
end
|
||||
|
||||
def cache_collection(raw, klass)
|
||||
|
@ -104,7 +104,6 @@ class MediaAttachment < ApplicationRecord
|
||||
|
||||
validates :account, presence: true
|
||||
validates :description, length: { maximum: 420 }, if: :local?
|
||||
validates :file, presence: true, if: :local?
|
||||
|
||||
scope :attached, -> { where.not(status_id: nil).or(where.not(scheduled_status_id: nil)) }
|
||||
scope :unattached, -> { where(status_id: nil, scheduled_status_id: nil) }
|
||||
|
@ -16,7 +16,7 @@ class HashtagQueryService < BaseService
|
||||
|
||||
private
|
||||
|
||||
def tags_for(names)
|
||||
Tag.matching_name(Array(names).take(LIMIT_PER_MODE)) if names.present?
|
||||
def tags_for(tags)
|
||||
Tag.where(name: tags.map(&:downcase)).limit(LIMIT_PER_MODE) if tags.presence
|
||||
end
|
||||
end
|
@ -53,7 +53,7 @@ class PostStatusService < BaseService
|
||||
def preprocess_attributes!
|
||||
@text = @options.delete(:spoiler_text) if @text.blank? && @options[:spoiler_text].present?
|
||||
@visibility = @options[:visibility] || @account.user&.setting_default_privacy
|
||||
@visibility = :unlisted if @visibility&.to_sym == :public && @account.silenced?
|
||||
@visibility = :unlisted if @visibility == :public && @account.silenced?
|
||||
@scheduled_at = @options[:scheduled_at]&.to_datetime
|
||||
@scheduled_at = nil if scheduled_in_the_past?
|
||||
rescue ArgumentError
|
||||
|
@ -13,7 +13,7 @@ class VoteService < BaseService
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
@choices.each do |choice|
|
||||
@votes << @poll.votes.create!(account: @account, choice: Integer(choice))
|
||||
@votes << @poll.votes.create!(account: @account, choice: choice)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user