Awesome,
I am trying to modify the current script that marks readed cards with
purple.
and I was able to delete the card that was already seen, when closing
and opening it will not be there.. the issue I have is to do it with out
having to do so as well.. but I get it always to crash, not very
familiar with LUA.
This below works.
```
photon = require("photon")
localStorage = require("localStorage")
photon.events.subscribe(
photon.events.FeedsDownloaded,
function(e)
for i = 1, photon.cards:len(), 1 do
local card = photon.cards:get(i)
local link = card:link()
local item = localStorage.getItem(link)
if item ~= nil then
photon.visibleCards:del(i)
--card:foreground(photon.ColorPurple)
end
end
end
)
```
but when I modify other function, is when it crash and I am sure is because of lack of LUA knowladge
```
function opened(e)
if localStorage.getItem(e:link()) ~= nil then
return
end
localStorage.setItem(e:link(), "")
photon.selectedCard:del(card())
--e:card():foreground(photon.ColorRed)
end
```
Any tips to get this working?
Thanks
ReK2