neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
small issue in previews where singles weren't being previewed good
c60da79 · gmorell · 2023-01-19 00:58
Files changed
modified
lib/lambent_ex/machine.ex
+3
−3
@@ -172,7 +172,7 @@ defmodule LambentEx.Machine do
| 172 | 172 | case state[:single] do |
| 173 | 173 | # expand single to fill cnt |
| 174 | 174 | true -> |
| 175 | − data |> List.flatten() |> Stream.cycle() |> Enum.take(state[:cnt] * 3) | |
| 175 | + data |> List.flatten() |> Stream.cycle() |> Enum.take(state[:cnt] * 3) |> Enum.chunk_every(3) | |
| 176 | 176 | |
| 177 | 177 | # do nothing |
| 178 | 178 | false -> |
@@ -189,7 +189,7 @@ defmodule LambentEx.Machine do
| 189 | 189 | Phoenix.PubSub.broadcast( |
| 190 | 190 | @pubsub_name, |
| 191 | 191 | @pubsub_topic_fh, |
| 192 | − {:firehose, {state[:name], data |> Enum.slice(0..32)}} | |
| 192 | + {:firehose, {state[:name], data |> Enum.slice(0..31)}} | |
| 193 | 193 | ) |
| 194 | 194 | state |> Map.put(:modpub, 0) |
| 195 | 195 |
@@ -201,7 +201,7 @@ defmodule LambentEx.Machine do
| 201 | 201 | Phoenix.PubSub.broadcast( |
| 202 | 202 | @pubsub_name, |
| 203 | 203 | @pubsub_topic_fh, |
| 204 | − {:firehose, {state[:name], data |> Enum.slice(0..32)}} | |
| 204 | + {:firehose, {state[:name], data |> Enum.slice(0..31)}} | |
| 205 | 205 | ) |
| 206 | 206 | |
| 207 | 207 | state |
Parents: 9b14fb6