Commit Graph

369 Commits

Author SHA1 Message Date
Stypox 53f8415e9b
Use @SuppressWarnings for checkstyle suppressions & warnings
It's better to use @SuppressWarnings instead of the suppressions file, so that the warning suppression is at the place where it acts.
2022-03-18 23:57:11 +01:00
Stypox 5f16e4ef87
Replace R.string.yes with R.string.ok
Android doesn't use yes/no but ok/cancel usually, so this should be done here, too
2022-03-02 12:21:25 +01:00
TacoTheDank 678edb1846 Update ktlint to 0.44.0 2022-02-26 16:08:10 -05:00
litetex 37517c7dd1
Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01: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
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
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 b21d231e3a
Merge pull request #7452 from litetex/show-alert-when-file-manager-not-found
Show an alert-dialog when no appropriate file-manager was found
2021-12-14 20:01:02 +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
XiangRongLin dd9772cde2
Merge pull request #7491 from Stypox/fix-search-order
Fix order of local search results
2021-12-14 09:07:17 -05:00
Stypox 8a5e2ffa57
Fix order of local search results 2021-12-08 13:59:32 +01:00
TacoTheDank 75db002369 Update ktlint to 0.43.2 2021-12-04 21:22:29 -05:00
Stypox 397f93b079
Prevent exception from being serialized in ErrorInfo
The wrong @Decorator was put in the wrong place to mark the throwable fieldd as transient, now this is fixed and the exception is not serialized. So if a non-serializable throwable is passed, that's not an issue, since it's not going to be serialized. The need for EnsureExceptionSerializable is also gone.
2021-12-04 10:36:36 +01:00
Stypox 81f740d409
Replace ErrorActivity with ErrorUtil 2021-12-04 10:36:36 +01:00
litetex b2323859e5 Refactoring + deduplicated code 2021-11-28 14:07:45 +01:00
litetex 68e7fcf8ee Fixed typos 2021-11-27 23:39:17 +01:00
litetex f78983b16b Show an alert/dialog when no appropriate file-manager was found 2021-11-27 15:52:54 +01: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
litetex 676bc02d52 No more reaction to unnecessary feed db-changes
This caused duplicate events (https://github.com/TeamNewPipe/NewPipe/pull/6686#issuecomment-909575283) and unnecessary processing of items
2021-11-15 20:21:23 +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 c35fe4f3f1 moved preference key from viewmodel to settings_keys.xml 2021-11-10 16:16:17 -05: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
litetex 7067deb328
Merge pull request #7261 from TacoTheDank/bumpRecyclerView
Update RecyclerView & Groupie libraries
2021-10-24 21:22:04 +02:00
TacoTheDank b6b19b474e Update RecyclerView & Groupie 2021-10-19 17:31:59 -04:00
TacoTheDank 51837ce36f Get rid of setUserVisibleHint 2021-10-16 15:33:45 -04:00
litetex 4af49ee5a6
Merge pull request #7194 from KalleStruik/add-to-playlist-in-share
Add a "add to playlist" option in the share menu
2021-10-13 20:34:07 +02:00
TobiGr 658d988254 Simplify code and add annotations 2021-10-10 20:33:05 +02:00
Kalle Struik 9d7e9289bb Fix cursor color in PlaylistCreationDialog 2021-10-10 12:32:57 +02:00
litetex 731640997e Cleaned up PlaylistDialog-related code 2021-10-09 18:46:20 +02:00