217
Note (nik90): After the upgrade to Ubuntu.Components 1.2, it seems the new listitems don't have their trailing
218
action width clamped. As a result when the list item expands and the user swipes left, it leads to a rather huge
219
trailing edge action. This has been reported upstream at http://pad.lv/1465582. Until this is fixed, the
220
episode description is shown in a dialog.
223
id: episodeDescriptionDialog
226
property string description
227
title: "<b>%1</b>".arg(i18n.tr("Episode Description"))
230
text: i18n.tr("Close")
231
color: podbird.appTheme.positiveActionButton
233
PopupUtils.close(dialogInternal)
279
302
subtitle: model.duration === 0 || model.duration === undefined ? model.artist
280
303
: Podcasts.formatEpisodeTime(model.duration) + " | " + model.artist
282
description: model.description
284
305
isDownloaded: model.downloadedfile ? true : false
286
307
showProgressBar: downloader.downloadingGuid === model.guid
336
iconName: currentUrl != "" && playerLoader.item.playbackState === MediaPlayer.PlayingState && currentGuid === model.guid ? "media-playback-pause"
337
: "media-playback-start"
339
var db = Podcasts.init();
340
db.transaction(function (tx) {
341
if (currentGuid === model.guid && currentUrl != "") {
342
if (playerLoader.item.playbackState === MediaPlayer.PlayingState) {
343
playerLoader.item.pause()
345
playerLoader.item.play()
349
currentUrl = model.downloadedfile ? model.downloadedfile : model.audiourl;
350
var rs = tx.executeSql("SELECT position FROM Episode WHERE guid=?", [model.guid]);
351
playerLoader.item.play();
352
playerLoader.item.seek(rs.rows.item(0).position);
353
currentName = model.name;
354
currentArtist = model.artist;
355
currentImage = model.image;
356
currentGuid = model.guid;
359
var popup = PopupUtils.open(episodeDescriptionDialog, whatsNewTab);
360
popup.description = model.description
368
var db = Podcasts.init();
369
db.transaction(function (tx) {
370
if (currentGuid !== model.guid) {
372
currentUrl = model.downloadedfile ? model.downloadedfile : model.audiourl;
373
var rs = tx.executeSql("SELECT position FROM Episode WHERE guid=?", [model.guid]);
374
playerLoader.item.play();
375
playerLoader.item.seek(rs.rows.item(0).position);
376
currentName = model.name;
377
currentArtist = model.artist;
378
currentImage = model.image;
379
currentGuid = model.guid;