1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-04 17:16:24 +00:00
NewPipe/app
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
..
schemas/org.schabi.newpipe.database.AppDatabase Make uploader_url column nullable 2021-08-14 17:48:35 +08:00
src Refactor generating InfoItemDialog's 2022-02-20 20:17:04 +01:00
build.gradle Change compileSdk from 30 to 31 2022-02-19 12:00:04 +01:00
proguard-rules.pro Show parsed relative times instead of whatever the service gives us 2019-11-17 23:58:55 -03:00