From f6bf061114c2fc591da8c82b851be69086feb36a Mon Sep 17 00:00:00 2001 From: cobodo Date: Sat, 29 Sep 2018 20:31:42 +0900 Subject: [PATCH] =?UTF-8?q?:aboutuser=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=82=92twitter=E9=9D=9E=E4=BE=9D=E5=AD=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/plugin/command/command.rb | 10 ++++++++++ core/plugin/user_detail_view/user_detail_view.rb | 15 --------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/core/plugin/command/command.rb b/core/plugin/command/command.rb index f8343a32..87dd3108 100644 --- a/core/plugin/command/command.rb +++ b/core/plugin/command/command.rb @@ -130,6 +130,16 @@ Plugin.create :command do } end + command(:aboutuser, + name: lambda { |opt| + (_("%{title}について") % { title: opt.messages.first.user.title }).gsub(/_/, '__') + }, + condition: Plugin::Command[:CanReplyAll], + visible: true, + icon: lambda{ |opt| opt && opt.messages.first.user.icon }, + role: :timeline) do |opt| + Plugin.call(:open, opt.messages.first.user) end + command(:select_prev, name: _('一つ上のメッセージを選択'), condition: ret_nth, diff --git a/core/plugin/user_detail_view/user_detail_view.rb b/core/plugin/user_detail_view/user_detail_view.rb index e69536de..93216aa0 100644 --- a/core/plugin/user_detail_view/user_detail_view.rb +++ b/core/plugin/user_detail_view/user_detail_view.rb @@ -132,21 +132,6 @@ Plugin.create :user_detail_view do timeline_storage.delete(widget.slug) UserConfig[:profile_opened_tabs] = timeline_storage.values.map(&:id) end end - command(:aboutuser, - name: lambda { |opt| - if defined? opt.messages.first and opt.messages.first.user.is_a?(User) - u = opt.messages.first.user - (_("%{screen_name}(%{name})について") % { - screen_name: u[:idname], - name: u[:name] }).gsub(/_/, '__') - else - _("ユーザについて") end }, - condition: Plugin::Command::CanReplyAll, - visible: true, - icon: lambda{ |opt| opt && opt.messages.first.user.icon }, - role: :timeline) do |opt| - Plugin.call(:open, opt.messages.first.user) end - def mutebutton(user) changer = lambda{ |new, widget| if new === nil -- 2.17.1