Commit Graph

101 Commits

Author SHA1 Message Date
Isira Seneviratne 097d32b684 Migrate to non-transitive R classes. 2024-03-25 15:12:30 +01:00
AudricV 9fab0ec94f
Fix crash when setting the masking of the new feed items button if the context is null
As the fragment context can be null in some cases, we have to make sure that
the context is not null before calling
DeviceUtils.hasAnimationsAnimatorDurationEnabled.

If the context is null, the button will now not be hidden automatically.
2023-11-15 19:04:45 +01:00
TacoTheDank b1faed586d Replace MathUtils.clamp with Kotlin coerceIn 2023-09-19 16:32:37 -04:00
Stypox 6b3a178f2a
Show snackbar with feed loading errors 2023-09-18 23:22:32 +02:00
TacoTheDank c1f0a945c0 Clean up AlertDialogs 2023-07-11 21:54:10 -04:00
Jared Fantaye 1dd0930b83 Fixed some small issues 2023-02-28 17:30:17 +01:00
Jared Fantaye bc29f40d69 Implemented the suggested changes 2023-02-09 21:18:21 +01:00
Jared Fantaye cd8d57040c Implemented the feature using multiple checkboxes 2023-02-04 18:48:27 +01:00
Jared Fantaye 9c82441c19 Implemented the feature and fixed some small issues 2023-02-01 23:10:31 +01:00
Jared Fantaye d2d324f2dd First draft of the new feature 2023-01-30 22:37:24 +01:00
TobiGr e9fcad4787 Fix SonarLint 2023-01-16 23:20:50 +01:00
TobiGr 640d4b0280 Fix more NPEs after OnSharedPreferenceChangeListener changes 2023-01-16 23:05:29 +01:00
Mahendran 7924bb5b6b Thumbnails used in NewPipe are small (list/grid) mode. This PR facilitates full width thumbnails and dubbed as card mode. 2023-01-15 22:32:03 +05:30
Stypox 9524c6245d
Merge pull request #8747 from Isira-Seneviratne/Range_limit
Use range-limiting methods in more places.
2022-10-28 10:34:04 +02:00
Stypox 489f052ef9
Fix feed menu tooltips (silly copy-paste error) 2022-09-19 11:21:42 +02:00
Stypox 051c572e7f
Show correct tooltips for actions in feed 2022-09-13 15:26:04 +02:00
Isira Seneviratne e136a6f915 Use range-limiting methods in more places. 2022-08-08 07:10:16 +05:30
Stypox 404c13d4c1 Improve FeedViewModel factory 2022-07-31 08:30:17 +05:30
Carlos Melero f22417e7e7 Add option to hide future videos in feed 2022-06-24 18:03:48 +02:00
litetex 1dc146322c Merged ``DrawableResolver`` into ``ThemeHelper`` 2022-04-16 21:21:57 +02:00
litetex 44dada9e60 Use better Kotlin syntax
From the PR review
2022-04-16 21:21:54 +02:00
litetex 4b06536582 Reworked switching to semitones
Using an expandable Tab-like component instead of a combobox
2022-04-16 21:21:51 +02:00
TacoTheDank cf213affa2 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
TacoTheDank 678edb1846 Update ktlint to 0.44.0 2022-02-26 16:08:10 -05:00
TobiGr 277f21d5b2 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr 646d8f431c Use identical method names for creating the InfoItemDialog in Fragments 2022-02-20 20:17:04 +01:00
TobiGr 962fe9c36d Use Context instead of Activity
Improve docs
2022-02-20 20:17:04 +01:00
TobiGr 50e2385e82 Add default entries automatically 2022-02-20 20:17:04 +01:00
TobiGr 1cd3ef5dba Extract entries into beginning and end category 2022-02-20 20:17:04 +01:00
TobiGr 80157fc1be Refactor generating InfoItemDialog's
This commit refactors the way `InfoItemDialog`s are generated. This is necessary because the old way used  the `StreamDialogEntry` enum for most of the dialogs' content generation process. This required static variables and methods to store the entries which are used for the dialog to be build (See e.g.`enabledEntries` and methods like `generateCommands()`). In other words, `StreamDialogEntry` wasn't an enumeration anymore.

To address this issue, a `Builder` is introduced for the `InfoItemDialog`'s genration. The builder also comes with some default entries and and a specific order. Both can be used, but are not enforced. 

A second problem that introduced a structure which was atypical for an enumeration was the usage of non-final attributes within `StreamDialogEntry` instances. These were needed, because the default actions needed to overriden in some cases.

To address this problem, the `StreamDialogEntry` enumeration was renamed to `StreamDialogDefaultEntry` and a new `StreamDialogEntry` class is used instead.
2022-02-20 20:17:04 +01:00
Stypox 71c5aaa11e
Do not show enqueue button if play queue not ready 2022-01-27 17:11:16 +01:00
mhmdanas 402990dd9d Fix false warning 2022-01-18 07:40:59 +03:00
Stypox 6cd25d7e55
Merge pull request #7412 from litetex/code-cleanup
Some code cleanup(s)
2021-11-23 08:59:34 +01:00
litetex 7638d229c0 Fixed typo 2021-11-15 20:24:40 +01:00
TacoTheDank a641c5bb58 Update Groupie to 2.9.0 2021-11-15 20:24:39 +01:00
litetex 1e0c9f46ad Improved highlighting in FeedFragment
Now keeps the ``selectableItemBackground`` when highligthing an item.
2021-11-15 20:22:23 +01:00
litetex 4eb02f584e Fixed default visibility of "new feed items" button
Fixed/Avoid NPEs
2021-11-15 20:22:22 +01:00
litetex 700c1b4b25 Removed unnecessary layout
Moved the feed button up a bit
2021-11-15 20:22:21 +01:00
litetex 4b4337e078 Used more understandable kotlin methods 2021-11-15 20:22:20 +01:00
litetex 38ce800685 Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
2021-11-15 20:22:20 +01:00
litetex 2310e8c1d6 Made ``hideNewItemsLoaded`` more null safe 2021-11-15 20:22:19 +01:00
litetex 1b2b3a4f88 Make new feed items bold 2021-11-15 20:22:18 +01:00
litetex 02789122a0 Implemented UI highlighting and "new feed items"-notification
Fixed format
2021-11-15 20:22:17 +01:00
Stypox 9e44053e22
Merge pull request #7160 from nschulzke/mark-as-watched-everywhere
Enable Mark as Watched in all the other playlist fragments.
2021-11-13 20:37:59 +01:00
Nathan Schulzke dee32c3dc5 Factor out shouldAddMarkAsWatched as a shared function 2021-11-13 10:18:17 -07:00
litetex adf9badbf6 Fixed toggle not in sync with list after app restart + refactored the code a bit 2021-11-11 19:46:15 +01:00
Baji Shaik 63291f8101 added show watched items toggle preference
default sharedpreference is used to persist and retrieve show watched menu option toggle state
2021-11-07 23:11:10 -05:00
litetex 272be36dd9 Removed ``e.printStacktrace`` and used an proper logger 2021-11-05 18:04:49 +01:00
TacoTheDank b61d44aaa6 Update Groupie to 2.9.0 2021-09-22 19:08:03 -04:00
z3r0r4 70354eb73e
Add play next to long press menu & refactor enqueue methods (#6872)
* added mvp play next button in long press menu; new intent handling, new long press dialog entry, new dialog functions, new strings

* changed line length for checkstyle pass

* cleaned comments, moved strings

* Update app/src/main/res/values/strings.xml

to make long press entry more descriptive

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>

* Update app/src/main/res/values/strings.xml

Co-authored-by: Stypox <stypox@pm.me>

* replace redundant nextOnVideoPlayer methods

Co-authored-by: Stypox <stypox@pm.me>

* add enqueueNextOnPlayer and enqueueOnPlayer without selectOnAppend and RESUME_PLAYBACK/ deprecate enqueueNextOn*Player and enqueueOn*Player methods
add getPlayerIntent, getPlayerEnqueueIntent and getPlayerEnqueueNextIntent without selectOnAppend and RESUME_PLAYBACK/ deprecate those with
add section comments

* removed deprecated methods
removed redundant methods

* removed deprecated methods
removed redundant methods

* replaced APPEND_ONLY, removed SELECT_ON_APPEND / replaced remaining enqueueOn*Player methods

* now works with playlists

* renamed dialog entry

* checking for >1 items in the queue using the PlayerHolder

* making enqueue*OnPlayer safe to call when no video is playing (defaulting to audio)

* corrected strings

* improve getQueueSize in PlayerHolder

* long press to enqueue only if queue isnt empty

* add Whitespace

Co-authored-by: Stypox <stypox@pm.me>

* clarify comments / add spaces

* PlayerType as parameter of the enqueueOnPlayer method
add Helper method

* using the helper function everywhere (except for the background and popup long-press actions (also on playlists, history, ...)), so basically nowhere
/ passing checkstyle

* assimilated the enqueue*OnPlayer methods

* removed redundant comment, variable

* simplify code line

Co-authored-by: Stypox <stypox@pm.me>

* move if

* replace workaround for isPlayerOpen()

Co-authored-by: Stypox <stypox@pm.me>

* replaced workarounds (getType), corrected static access with getInstance

* remove unused imports

* changed method call to original, new method doesnt exist yet.

* Use getter method instead of property access syntax.

* improve conditional for play next entry

Co-authored-by: Stypox <stypox@pm.me>

* show play next btn in feed fragment

Co-authored-by: Stypox <stypox@pm.me>

* add play next to local playlist and statistics fragment

Co-authored-by: Stypox <stypox@pm.me>

* formating

Co-authored-by: Stypox <stypox@pm.me>

* correcting logic

Co-authored-by: Stypox <stypox@pm.me>

* remove 2 year old unused string, formating

Co-authored-by: Stypox <stypox@pm.me>

* correct enqueue (next) conditionals, default to background if no player is open. Dont generally default to background play.

* remove player open checks from button long press enqueue actions

* improve log msg

* Rename next to enqueue_next

* Refactor kotlin

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>
Co-authored-by: Stypox <stypox@pm.me>
2021-09-18 11:22:49 +02:00