提案 #1298 » aboutuser-without-twitter.patch
core/plugin/command/command.rb | ||
---|---|---|
130 | 130 |
} |
131 | 131 |
end |
132 | 132 | |
133 |
command(:aboutuser, |
|
134 |
name: lambda { |opt| |
|
135 |
(_("%{title}について") % { title: opt.messages.first.user.title }).gsub(/_/, '__') |
|
136 |
}, |
|
137 |
condition: Plugin::Command[:CanReplyAll], |
|
138 |
visible: true, |
|
139 |
icon: lambda{ |opt| opt && opt.messages.first.user.icon }, |
|
140 |
role: :timeline) do |opt| |
|
141 |
Plugin.call(:open, opt.messages.first.user) end |
|
142 | ||
133 | 143 |
command(:select_prev, |
134 | 144 |
name: _('一つ上のメッセージを選択'), |
135 | 145 |
condition: ret_nth, |
core/plugin/user_detail_view/user_detail_view.rb | ||
---|---|---|
132 | 132 |
timeline_storage.delete(widget.slug) |
133 | 133 |
UserConfig[:profile_opened_tabs] = timeline_storage.values.map(&:id) end end |
134 | 134 | |
135 |
command(:aboutuser, |
|
136 |
name: lambda { |opt| |
|
137 |
if defined? opt.messages.first and opt.messages.first.user.is_a?(User) |
|
138 |
u = opt.messages.first.user |
|
139 |
(_("%{screen_name}(%{name})について") % { |
|
140 |
screen_name: u[:idname], |
|
141 |
name: u[:name] }).gsub(/_/, '__') |
|
142 |
else |
|
143 |
_("ユーザについて") end }, |
|
144 |
condition: Plugin::Command::CanReplyAll, |
|
145 |
visible: true, |
|
146 |
icon: lambda{ |opt| opt && opt.messages.first.user.icon }, |
|
147 |
role: :timeline) do |opt| |
|
148 |
Plugin.call(:open, opt.messages.first.user) end |
|
149 | ||
150 | 135 |
def mutebutton(user) |
151 | 136 |
changer = lambda{ |new, widget| |
152 | 137 |
if new === nil |