|
|
|
@ -11,7 +11,7 @@ local screen = require("screen") |
|
|
|
|
local database = require("database") |
|
|
|
|
local img = require("images") |
|
|
|
|
|
|
|
|
|
return screen:new{ |
|
|
|
|
return screen:new { |
|
|
|
|
create_ui = function(self) |
|
|
|
|
self.root = lvgl.Object(nil, { |
|
|
|
|
flex = { |
|
|
|
@ -31,7 +31,7 @@ return screen:new{ |
|
|
|
|
title = self.title |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
local header = self.root:Object{ |
|
|
|
|
local header = self.root:Object { |
|
|
|
|
flex = { |
|
|
|
|
flex_direction = "column", |
|
|
|
|
flex_wrap = "wrap", |
|
|
|
@ -49,7 +49,7 @@ return screen:new{ |
|
|
|
|
theme.set_subject(header, "header") |
|
|
|
|
|
|
|
|
|
if self.breadcrumb then |
|
|
|
|
header:Label{ |
|
|
|
|
header:Label { |
|
|
|
|
text = self.breadcrumb, |
|
|
|
|
text_font = font.fusion_10 |
|
|
|
|
} |
|
|
|
@ -94,9 +94,10 @@ return screen:new{ |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local get_icon_func = nil |
|
|
|
|
local show_listened = self.mediatype == database.MediaTypes.Audiobook or self.mediatype == database.MediaTypes.Podcast |
|
|
|
|
local show_listened = self.mediatype == database.MediaTypes.Audiobook or |
|
|
|
|
self.mediatype == database.MediaTypes.Podcast |
|
|
|
|
if show_listened then |
|
|
|
|
get_icon_func = function (item) |
|
|
|
|
get_icon_func = function(item) |
|
|
|
|
local contents = item:contents() |
|
|
|
|
if type(contents) == "userdata" then |
|
|
|
|
return |
|
|
|
@ -109,7 +110,6 @@ return screen:new{ |
|
|
|
|
return img.unlistened |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ return screen:new{ |
|
|
|
|
return function() |
|
|
|
|
local contents = item:contents() |
|
|
|
|
if type(contents) == "userdata" then |
|
|
|
|
backstack.push(require("browser"):new{ |
|
|
|
|
backstack.push(require("browser"):new { |
|
|
|
|
title = self.title, |
|
|
|
|
iterator = contents, |
|
|
|
|
mediatype = self.mediatype, |
|
|
|
|