mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-10 07:38:10 -05:00
11 lines
328 B
Ruby
11 lines
328 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ConversationsHelper
|
|
def conversation_class(conversation, unread_count, selected_conversation_id)
|
|
conv_class = unread_count > 0 ? "unread" : ""
|
|
return conv_class unless selected_conversation_id && conversation.id == selected_conversation_id
|
|
|
|
"#{conv_class} selected"
|
|
end
|
|
end
|