Commit Graph

381 Commits

Author SHA1 Message Date
Stypox 28b34f3796
Fix scroll issues in suggestion list
Before if the list before updating contained item 'test' at position 0 and after updating that value went to the bottom, the list would incorrectly scroll to the bottom to follow that item. Now the scrolling is done after the list is updated.
2022-09-14 14:39:32 +02:00
Stypox 1f57c87859
Disable suggestion list animations: not meaningful
The animations were just in the way and did not help in choosing items, since the suggestion items keep changing too much.
2022-09-14 14:04:22 +02:00
Stypox fbf5549182
Fix wrong icons being set on suggestion items
The diff util wrongly considered as equal two items with the same text but with different `fromHistory` value
2022-09-14 14:01:59 +02:00
Isira Seneviratne 67669c286b Use ListAdapter in SuggestionListAdapter. 2022-08-18 19:52:51 +05:30
Isira Seneviratne fc46233baf Use toArray() with zero-length arrays. 2022-08-05 06:50:55 +05:30
Isira Seneviratne 47f58040d1 Make OnClickGesture an interface. 2022-08-01 06:47:00 +05:30
Isira Seneviratne 6d1c61407d Remove unnecessary method in ChannelFragment. 2022-07-21 08:02:23 +05:30
Stypox 8187a3bc04
Move PlayerType into its own class and add documentation
Also replace some `isPlayerOpen` with direct `playerType == null` checks.
2022-07-13 23:33:18 +02:00
Stypox 76ced59b62
Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
litetex 99104fc11d
Clean up pre-Lollipop checks 2022-07-13 19:02:24 +02:00
Isira Seneviratne 21d2ae709f Merge branch 'dev' into Use_AppCompatResources
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
2022-05-16 12:36:00 +05:30
Isira Seneviratne c5e509f069 Use AppCompatResources. 2022-05-16 12:27:44 +05:30
petlyh fcaa787060 Add a "Add to playlist" item to the remote playlist menu 2022-05-10 08:48:21 +02:00
Stypox 71e46d1eca
Do not call showContentNotSupportedIfNeeded multiple times 2022-05-06 10:40:08 +02:00
Stypox 238aff7c31
channelContentNotSupported false by default 2022-05-06 10:38:47 +02:00
GGAutomaton 34468c16ad Show "content not supported" if needed 2022-05-04 23:34:07 +08:00
GGAutomaton 2e771cd65a Fix crash when rotating device on unsupported channels 2022-04-04 23:58:39 +08:00
Stypox 6e8c9f92cb
Merge branch 'dev' into pr2335 2022-03-19 22:29:10 +01:00
TacoTheDank cf213affa2 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
litetex 37517c7dd1
Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
litetex 5be40f62f3
Merge pull request #7904 from Stypox/fix-raw-use-of-parameterized-class
Solve Java warning "Raw use of parameterized class"
2022-02-26 16:14:23 +01:00
TacoTheDank 1a000fecd5 Replace CircleImageView with ShapeableImageView 2022-02-23 15:11:25 -05:00
TobiGr 277f21d5b2 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr fd0d76e866 Apply feedback
Return this in InfoIrtemDialog.Builder methoods.
Move null checks for InfoIrtemDialog.Builder into constructor.
Fix and add some more docs.
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 62abfa96b8
Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +01:00
TobiGr ff8e44e4f3 Merge branch 'dev' into feature/notifications 2022-02-19 12:34:44 +01:00
litetex 2acaefdb2a Fixed scrolling not working when rotating device 2022-02-17 20:59:41 +01:00
litetex 85f701b94e Fixed listener not re-registering after e.g. a new search is started 2022-02-17 20:59:38 +01:00
litetex ff7cfe4715 Reverted to loading behavior of #7638 and improved it
The previous/reverted behavior caused unwanted data transmission:
* Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
2022-02-17 20:59:38 +01:00
litetex d3cd3d62b4 Tried to repair #4475 and #3368
* Always recreate the footer so that it's not possible to attach the same instance twice
* Removed support for creating a custom footer as it's never used
* Supply the header with an supplier
  * This might not fix the problem completely as we currently can only create the header once inside Channel, Playlist and RelatedItems-Fragment - allowing creation of multiple headers might be done in the future if the issues still arise
* Other minor fixes
2022-02-17 20:59:36 +01:00
litetex 91c67b085b Code improvements
Removed - partial - stupid code.
2022-02-17 20:59:35 +01:00
litetex fb362022f7 Load enough initial data into BaseListFragment 2022-02-17 20:59:33 +01:00
litetex be95d7fe0f
Merge pull request #7704 from Stypox/fix-stream-menu-crash
Fix crash when long-pressing stream while player is starting
2022-02-09 19:53:09 +01:00
Stypox 71c5aaa11e
Do not show enqueue button if play queue not ready 2022-01-27 17:11:16 +01:00
litetex f3be89b503 Abstracted methods for the Android keyboard 2022-01-24 21:08:39 +01:00
Stypox d5cfcb28fc
Merge branch 'dev' into pr2335 2022-01-24 10:25:07 +01:00
TiA4f8R 6672169707
Fix NullPointerException when sharing a playlist which is loading
Prevent a NullPointerException by adding a null check for currentInfo when sharing a playlist.
2022-01-15 21:19:04 +01:00
Stypox cd95ec4e12
Merge branch 'dev' into pr2335 2021-12-31 19:20:18 +01:00
TobiGr 37b8a9375f Small improvements to code quality and readability
Add annotations to methods and parameters.
Replace Jetbrains' @NotNull with Androidx' @NonNull annotatiation.
Make class variables static if possible.
Use constants for some Strings.
Simplify if conditions.
2021-12-21 20:55:41 +01:00
litetex 4058277b7a
Merge pull request #7482 from TeamNewPipe/unify-error-reporting
Unify error reporting and add error notification
2021-12-14 19:58:41 +01:00
Stypox 8a5e2ffa57
Fix order of local search results 2021-12-08 13:59:32 +01:00
Stypox 81f740d409
Replace ErrorActivity with ErrorUtil 2021-12-04 10:36:36 +01:00
TobiGr 892a1df280 Merge remote-tracking branch 'origin/dev' into notifications-1 2021-11-21 22:15:09 +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