Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Commit

Permalink
remove unused variable from render_badges
Browse files Browse the repository at this point in the history
  • Loading branch information
meppu committed Jul 4, 2023
1 parent 7b416e3 commit 4af7842
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/revard/card/renderer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Revard.Card.Renderer do
if(Utils.hex_color?(options["mask_color"]), do: options["mask_color"], else: "000000")

# Badge elements
badges = if(options["hide_badges"] != nil, do: [], else: render_badges(user_data, mask_color))
badges = if(options["hide_badges"] != nil, do: [], else: render_badges(user_data))

# Status element
status =
Expand Down Expand Up @@ -90,7 +90,7 @@ defmodule Revard.Card.Renderer do
defp get_status_color(%{"online" => true}), do: "#3ABF7E"
defp get_status_color(_other), do: "#A5A5A5"

defp render_badges(%{"badges" => badges}, mask_color) do
defp render_badges(%{"badges" => badges}) do
[
(badges &&& 1) == 1 && "developer",
(badges &&& 2) == 2 && "translator",
Expand All @@ -109,7 +109,7 @@ defmodule Revard.Card.Renderer do
)
end

defp render_badges(_other, _color) do
defp render_badges(_other) do
[]
end

Expand Down

0 comments on commit 4af7842

Please sign in to comment.