This gives a visual indication that even while the first few
items in the list are already visible, the list isn't fully
interactive (due to new items coming in regularly) yet.
For some reason, we needed to apply a offset of 36 pixels, so that the
overlay sheet aligns with the window. However, this offset gives
problems in landscape (it also gives a visual glitch when the sheet is
closed, as it could be partially visible at the bottom of the window).
This fixes it by not applying the offset fix when the window is in
landscape mode or when the sheet is closed.
Thanks to Andi for reporting this issue.
The current Sailfish UI is maintained as part of gPodder 4 in
gpodder-core, gpodder-ui-qml and gpodder-sailfish. The code
removed here was part of the old, Qt4-based Sailfish Alpha
SDK-based port that was still using PySide and Python 2.
The bug could have caused an empty directory in the current working
directory to be removed if an empty folder of the same name exists in
the download directory.
I'm not opposed to 'for... else' myself, but I admit that even so I still have
to check [1] every time to remember what Raymond Hettinger suggests the 'else'
*should* have been called (hint: 'nobreak')...
[1] https://www.youtube.com/watch?v=OSGv2VnC0go&t=15m50s
'same_second' is a bit of a misleading name: it could be understood to check
whether or not two times are "in the same second" rather than whether two times
are "within a second of each other" (so, 1.999 and 2.001 might be thought to
fail this check).
Indeed, the function was originally implemented as "in the same second"; but
that implementation was incorrect in the context in which we use it, and the
implementation was fixed in [1]; unfortunately, the name was not changed as
part of that fix... Fixing the name, too, now.
[1] da2c5444fe
--HG--
extra : amend_source : 0da64760fe6926460641f9ef158bcd23963bf963
on_episode_synced pararms:
device: gpodder.sync.Device instance
episode: gpodder.model.PodcastEpisode instance
replace on_episode_downloaded with on_episode_synced in sync.py
This will allow users to make extensions that are triggered
after a file has been synced to a device
only effects MP3PlayerDevice
easy way to get folder and filename that episode will be
synced to on device
get_episode_folder_on_device(episode):
returns folder location on device episode will be
synced into
get_episode_file_on_device(episode):
returns filename that will be used on device