mirror of
https://github.com/algora-io/tv.git
synced 2025-03-17 20:17:45 +02:00
fix(bug): allow index to load when there are no ads (#89)
This commit is contained in:
parent
816781021c
commit
bf8c6ac49c
@ -159,6 +159,10 @@ defmodule Algora.Ads do
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
def get_current_index([]) do
|
||||
0
|
||||
end
|
||||
|
||||
def get_current_index(ads) do
|
||||
:os.system_time(:millisecond)
|
||||
|> div(rotation_interval())
|
||||
|
Loading…
x
Reference in New Issue
Block a user