Added logic to show/hide the Download button on CollectionsFragment & the CollectionEpisodeItemViewHolder, depending on if the user has or doesn't have download permissions.
This fixes #264.
I simply added the isDownloadAvailable variable to the data binding setup of these two classes/layouts, and as such can change if the user should see the DL button or not.
The important code in the XML is the following:
// within the Data Binding setup
<variable
name="isDownloadAvailable"
type="Boolean" />
// within the DownloadButton tags
android:visibility="@{isDownloadAvailable ? View.VISIBLE : View.GONE}"
There are also some formatting changes here, as some files were indented with tabs instead of spaces and vice versa. I chose to opt into spaces, as that's the default, and also as that is what the majority of files use.
Added logic to show/hide the Download button on
CollectionsFragment
& theCollectionEpisodeItemViewHolder
, depending on if the user has or doesn't have download permissions.This fixes #264.
I simply added the
isDownloadAvailable
variable to the data binding setup of these two classes/layouts, and as such can change if the user should see the DL button or not.The important code in the XML is the following:
There are also some formatting changes here, as some files were indented with tabs instead of spaces and vice versa. I chose to opt into spaces, as that's the default, and also as that is what the majority of files use.