プロジェクト

全般

プロフィール

バグ #1242 » 1242-score-memoize.patch

cob odo, 2018-05-13 00:08

差分を表示:

core/mui/cairo_markup_generator.rb
=end
module Gdk::MarkupGenerator
# :nodoc:
memoize def score
Plugin[:gtk].score_of(message)
end
# 表示する際に本文に適用すべき装飾オブジェクトを作成する
# ==== Return
# Pango::AttrList 本文に適用する装飾
def description_attr_list(attr_list=Pango::AttrList.new, emoji_height: 24)
Plugin[:gtk].score_of(message).inject(0){|start_index, note|
score.inject(0){|start_index, note|
end_index = start_index + note.description.bytesize
if note.respond_to?(:inline_photo)
end_index += -note.description.bytesize + 1
core/mui/cairo_miracle_painter.rb
message end
deprecate :to_message, :none, 2017, 5
# :nodoc:
memoize def score
Plugin[:gtk].score_of(message)
end
# @@miracle_painters = Hash.new
# _message_ を内部に持っているGdk::MiraclePainterの集合をSetで返す。
    (1-1/1)